@@ -3,17 +3,6 @@ name: Build
33on :
44 workflow_call :
55
6- env :
7- DOCKER_META_IMAGES : |
8- darthsim/imgproxy
9- ghcr.io/imgproxy/imgproxy
10- DOCKER_META_TAGS : |
11- type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
12- type=ref,event=branch,enable=${{ startsWith(github.ref, 'refs/heads/test/') }}
13- type=ref,event=tag
14- type=semver,pattern=v{{major}}.{{minor}}
15- type=semver,pattern=v{{major}}
16-
176jobs :
187 build :
198 strategy :
@@ -25,32 +14,14 @@ jobs:
2514 - arch : arm64
2615 dockerPlatform : linux/arm64/v8
2716 image : arm-3.0
28- runs-on :
29- - codebuild-imgproxy-${{ github.run_id }}-${{ github.run_attempt }}
30- - image:${{ matrix.build.image }}
17+ runs-on : ubuntu-latest
3118 permissions :
3219 contents : read
3320 packages : write
3421 steps :
3522 - name : Checkout
3623 uses : actions/checkout@v4
3724
38- - name : Docker meta
39- id : meta
40- uses : docker/metadata-action@v5
41- with :
42- images : ${{ env.DOCKER_META_IMAGES }}
43- tags : ${{ env.DOCKER_META_TAGS }}
44- flavor : |
45- latest=false
46- suffix=-${{ matrix.build.arch }}
47-
48- - name : Login to Docker Hub
49- uses : docker/login-action@v3
50- with :
51- username : ${{ vars.DOCKERHUB_USERNAME }}
52- password : ${{ secrets.DOCKERHUB_TOKEN }}
53-
5425 - name : Login to GitHub Container Registry
5526 uses : docker/login-action@v3
5627 with :
6334 with :
6435 context : .
6536 file : ./docker/Dockerfile
66- tags : ${{ steps.meta.outputs.tags }}
67- labels : ${{ steps.meta.outputs.labels }}
6837 platforms : ${{ matrix.build.dockerPlatform }}
6938 provenance : false
70- push : true
71-
72- push_manifests :
73- needs : build
74- runs-on : ubuntu-latest
75- permissions :
76- contents : read
77- packages : write
78- steps :
79- - name : Docker meta
80- id : meta
81- uses : docker/metadata-action@v5
82- with :
83- images : ${{ env.DOCKER_META_IMAGES }}
84- tags : ${{ env.DOCKER_META_TAGS }}
85- flavor : |
86- latest=false
87- env :
88- DOCKER_METADATA_ANNOTATIONS_LEVELS : manifest,index
89-
90- - name : Login to Docker Hub
91- uses : docker/login-action@v3
92- with :
93- username : ${{ vars.DOCKERHUB_USERNAME }}
94- password : ${{ secrets.DOCKERHUB_TOKEN }}
95-
96- - name : Login to GitHub Container Registry
97- uses : docker/login-action@v3
98- with :
99- registry : ghcr.io
100- username : ${{ github.actor }}
101- password : ${{ secrets.GITHUB_TOKEN }}
102-
103- - name : Push manifests
104- run : |
105- ANNOTATIONS=""
106- for annotation in "${{ join(fromJSON(steps.meta.outputs.json).annotations, '" "') }}"
107- do
108- ANNOTATIONS="$ANNOTATIONS --annotation '$annotation'";
109- done
110-
111- for tag in ${{ join(fromJSON(steps.meta.outputs.json).tags, ' ') }}
112- do
113- sh -c "docker buildx imagetools create ${ANNOTATIONS} -t $tag ${tag}-amd64 ${tag}-arm64"
114- done
39+ push : false
11540
0 commit comments