@@ -7,34 +7,70 @@ concurrency:
77 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
88 cancel-in-progress : true
99
10+ permissions :
11+ contents : read
12+
13+ env :
14+ CACHE_ROOTFUL : " type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootful"
15+ CACHE_ROOTLESS : " type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootless"
16+
1017jobs :
1118 files-changed :
1219 uses : ./.github/workflows/files-changed.yml
1320 permissions :
1421 contents : read
1522
16- container :
23+ # dryrun build is slow, so run them parallelly per-platform
24+ container-amd64-rootful :
1725 if : needs.files-changed.outputs.docker == 'true'
1826 needs : files-changed
19- runs-on : ubuntu-latest
20- permissions :
21- contents : read
22- steps :
23- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24- - uses : docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
25- - uses : docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
26- - name : Build regular container image
27- uses : docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
28- with :
29- context : .
30- platforms : linux/amd64,linux/arm64,linux/riscv64
31- push : false
32- cache-from : type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootful
33- - name : Build rootless container image
34- uses : docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
35- with :
36- context : .
37- push : false
38- platforms : linux/amd64,linux/arm64,linux/riscv64
39- file : Dockerfile.rootless
40- cache-from : type=registry,ref=ghcr.io/go-gitea/gitea:buildcache-rootless
27+ uses : ./.github/workflows/part-docker-dryrun.yml
28+ with :
29+ platform : linux/amd64
30+ dockerfile : Dockerfile
31+ cache_from : ${{ env.CACHE_ROOTFUL }}
32+
33+ container-amd64-rootless :
34+ if : needs.files-changed.outputs.docker == 'true'
35+ needs : files-changed
36+ uses : ./.github/workflows/part-docker-dryrun.yml
37+ with :
38+ platform : linux/amd64
39+ dockerfile : Dockerfile.rootless
40+ cache_from : ${{ env.CACHE_ROOTLESS }}
41+
42+ container-arm64-rootful :
43+ if : needs.files-changed.outputs.docker == 'true'
44+ needs : files-changed
45+ uses : ./.github/workflows/part-docker-dryrun.yml
46+ with :
47+ platform : linux/arm64
48+ dockerfile : Dockerfile
49+ cache_from : ${{ env.CACHE_ROOTFUL }}
50+
51+ container-arm64-rootless :
52+ if : needs.files-changed.outputs.docker == 'true'
53+ needs : files-changed
54+ uses : ./.github/workflows/part-docker-dryrun.yml
55+ with :
56+ platform : linux/arm64
57+ dockerfile : Dockerfile.rootless
58+ cache_from : ${{ env.CACHE_ROOTLESS }}
59+
60+ container-riscv64-rootful :
61+ if : needs.files-changed.outputs.docker == 'true'
62+ needs : files-changed
63+ uses : ./.github/workflows/part-docker-dryrun.yml
64+ with :
65+ platform : linux/riscv64
66+ dockerfile : Dockerfile
67+ cache_from : ${{ env.CACHE_ROOTFUL }}
68+
69+ container-riscv64-rootless :
70+ if : needs.files-changed.outputs.docker == 'true'
71+ needs : files-changed
72+ uses : ./.github/workflows/part-docker-dryrun.yml
73+ with :
74+ platform : linux/riscv64
75+ dockerfile : Dockerfile.rootless
76+ cache_from : ${{ env.CACHE_ROOTLESS }}
0 commit comments