File tree Expand file tree Collapse file tree 2 files changed +77
-0
lines changed Expand file tree Collapse file tree 2 files changed +77
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Build Contributor container (PR)'
2
+ # For speedup to do this in parallel: https://docs.docker.com/build/ci/github-actions/multi-platform/
3
+ # Loosely based on: https://docs.docker.com/build/ci/github-actions/push-multi-registries/
4
+
5
+ on :
6
+ push :
7
+ pull_request_target :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ pr-contributor :
13
+ if : ${{ github.repository != 'domjudge/domjudge-packaging' || github.ref != 'main' }}
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ - name : Set up QEMU
19
+ uses : docker/setup-qemu-action@v3
20
+ - name : Set up Docker Buildx
21
+ uses : docker/setup-buildx-action@v3
22
+ - name : Login to Docker Hub
23
+ uses : docker/login-action@v3
24
+ with :
25
+ registry : ghcr.io
26
+ username : ${{ github.repository_owner }}
27
+ password : ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ - name : Extract metadata (tags, labels) for Docker
30
+ id : meta
31
+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
32
+ with :
33
+ images : ghcr.io/${{ github.repository }}
34
+
35
+ - name : Build and push
36
+ uses : docker/build-push-action@v5
37
+ with :
38
+ context : docker-contributor
39
+ platforms : linux/amd64,linux/arm64
40
+ push : true
41
+ tags : ${{ steps.meta.outputs.tags }}
42
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
1
+ name : ' Build Contributor container (Release)'
2
+ # For speedup to do this in parallel: https://docs.docker.com/build/ci/github-actions/multi-platform/
3
+ # Loosely based on: https://docs.docker.com/build/ci/github-actions/push-multi-registries/
4
+
5
+ on :
6
+ push :
7
+ pull_request_target :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ release-contributor :
13
+ if : ${{ github.repository == 'domjudge/domjudge-packaging' && github.ref == 'main' }}
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ - name : Set up QEMU
19
+ uses : docker/setup-qemu-action@v3
20
+ - name : Set up Docker Buildx
21
+ uses : docker/setup-buildx-action@v3
22
+ - name : Login to Docker Hub
23
+ uses : docker/login-action@v3
24
+ with :
25
+ registry : ghcr.io
26
+ username : ${{ env.DOCKERHUB_USERNAME }}
27
+ password : ${{ env.DOCKERHUB_TOKEN }}
28
+
29
+ - name : Build and push
30
+ uses : docker/build-push-action@v5
31
+ with :
32
+ context : docker-contributor
33
+ platforms : linux/amd64,linux/arm64
34
+ push : true
35
+ tags : domjudge/domjudge-contributor:latest
You can’t perform that action at this time.
0 commit comments