6767 if-no-files-found : error
6868 retention-days : 1
6969
70+ build-node :
71+ runs-on : ${{ matrix.runner }}
72+ strategy :
73+ matrix :
74+ include :
75+ - runner : ubuntu-latest
76+ platform : linux/amd64
77+ - runner : ubuntu-24.04-arm
78+ platform : linux/arm64
79+ steps :
80+ - name : Checkout
81+ uses : actions/checkout@v4
82+
83+ - name : Set up Docker Buildx
84+ uses : docker/setup-buildx-action@v3
85+
86+ - name : Login to Quay.io
87+ uses : docker/login-action@v3
88+ with :
89+ registry : quay.io
90+ username : ${{ secrets.QUAY_USERNAME }}
91+ password : ${{ secrets.QUAY_ROBOT_TOKEN }}
92+
93+ - name : Extract Docker metadata
94+ id : meta
95+ uses : docker/metadata-action@v5.5.1
96+ with :
97+ images : quay.io/ydrag0n/streambot
98+
99+ - name : Build and push by digest
100+ id : build
101+ uses : docker/build-push-action@v6
102+ with :
103+ context : .
104+ file : Dockerfile.node
105+ platforms : ${{ matrix.platform }}
106+ labels : ${{ steps.meta.outputs.labels }}
107+ outputs : type=image,name=quay.io/ydrag0n/streambot,push-by-digest=true,name-canonical=true,push=true
108+ cache-from : type=gha
109+ cache-to : type=gha,mode=max
110+
111+ - name : Export digest
112+ run : |
113+ mkdir -p /tmp/digests-node
114+ digest="${{ steps.build.outputs.digest }}"
115+ touch "/tmp/digests-node/${digest#sha256:}"
116+
117+ - name : Upload digest
118+ uses : actions/upload-artifact@v4
119+ with :
120+ name : digests-node-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
121+ path : /tmp/digests-node/*
122+ if-no-files-found : error
123+ retention-days : 1
124+
70125 merge :
71126 runs-on : ubuntu-latest
72127 needs :
@@ -101,4 +156,40 @@ jobs:
101156 docker buildx imagetools create \
102157 --tag quay.io/ydrag0n/streambot:latest \
103158 --tag quay.io/ydrag0n/streambot:${{ github.ref_name }} \
159+ $(printf 'quay.io/ydrag0n/streambot@sha256:%s ' *)
160+
161+ merge-node :
162+ runs-on : ubuntu-latest
163+ needs :
164+ - build-node
165+ steps :
166+ - name : Download digests
167+ uses : actions/download-artifact@v4
168+ with :
169+ path : /tmp/digests-node
170+ pattern : digests-node-*
171+ merge-multiple : true
172+
173+ - name : Set up Docker Buildx
174+ uses : docker/setup-buildx-action@v3
175+
176+ - name : Login to Quay.io
177+ uses : docker/login-action@v3
178+ with :
179+ registry : quay.io
180+ username : ${{ secrets.QUAY_USERNAME }}
181+ password : ${{ secrets.QUAY_ROBOT_TOKEN }}
182+
183+ - name : Extract Docker metadata
184+ id : meta
185+ uses : docker/metadata-action@v5.5.1
186+ with :
187+ images : quay.io/ydrag0n/streambot
188+
189+ - name : Create manifest list and push
190+ working-directory : /tmp/digests-node
191+ run : |
192+ docker buildx imagetools create \
193+ --tag quay.io/ydrag0n/streambot:node \
194+ --tag quay.io/ydrag0n/streambot:node-${{ github.ref_name }} \
104195 $(printf 'quay.io/ydrag0n/streambot@sha256:%s ' *)
0 commit comments