-
Notifications
You must be signed in to change notification settings - Fork 141
64 lines (54 loc) · 1.77 KB
/
docker_upload.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: bandersnatch_docker_upload
on:
push:
branches:
- main
release:
types: created
jobs:
docker:
runs-on: ubuntu-latest
if: github.repository == 'pypa/bandersnatch'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Check + set version tag
run:
echo "GIT_TAG=$(git describe --candidates=0 --tags 2> /dev/null || echo
latest_non_release)" >> $GITHUB_ENV
- name: Build and push filesystem image
uses: docker/build-push-action@v6
env:
PY_VERSION: '3.12'
with:
build-args: PY_VERSION
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: pypa/bandersnatch:latest,pypa/bandersnatch:${{ env.GIT_TAG }},pypa/bandersnatch:3,pypa/bandersnatch:3.12
- name: Filesystem Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Build and push s3 image
uses: docker/build-push-action@v6
env:
PY_VERSION: '3.12'
WITH_S3: yes
with:
build-args: |
PY_VERSION
WITH_S3
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: pypa/bandersnatch:s3-latest,pypa/bandersnatch:s3-${{ env.GIT_TAG }},pypa/bandersnatch:s3-3,pypa/bandersnatch:s3-3.12
- name: S3 Image digest
run: echo ${{ steps.docker_build.outputs.digest }}