7777 echo "$MATRIX"
7878 echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
7979
80- ARCH_LIST=$(echo "$MATRIX" | jq -r '.[].arch' | jq -R -s -c 'split("\n") | map(select(. != ""))')
80+ - name : Generate Arch List
81+ id : generate-arch-list
82+ run : |
83+ ARCH_LIST=$(nix run .#archs --quiet)
84+ echo "Generated Archs:"
85+ echo "$ARCH_LIST"
8186 echo "arch_list=$ARCH_LIST" >> $GITHUB_OUTPUT
8287
8388 build :
@@ -173,7 +178,7 @@ jobs:
173178 strategy :
174179 fail-fast : false
175180 matrix :
176- include : ${{ fromJson(needs.generate-matrix .outputs.matrix ) }}
181+ include : ${{ fromJson(needs.generate-arch-list .outputs.arch_list ) }}
177182 steps :
178183 - uses : actions/checkout@v4
179184 - name : Set Repository Lowercase
@@ -193,16 +198,12 @@ jobs:
193198 docker load < ./result
194199 docker tag grhooks:${{ env.VERSION }} ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ matrix.arch }}
195200
196- - name : Create and push unified manifest
197- run : |
198- docker manifest create ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ env.VERSION }} \
199- --amend ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ matrix.arch }}
200-
201201 docker-publish :
202202 runs-on : ubuntu-latest
203203 needs : [setup, generate-matrix, docker-build]
204204 env :
205205 VERSION : ${{ needs.setup.outputs.version }}
206+ ARCHS : ${{ needs.generate-arch-list.outputs.arch_list }}
206207 steps :
207208 - name : Log in to GHCR
208209 uses : docker/login-action@v3
@@ -216,7 +217,6 @@ jobs:
216217 - name : Create and push manifest
217218 run : |
218219 IMAGE=ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ env.VERSION }}
219- ARCHS='${{ needs.generate-matrix.outputs.arch_list }}'
220220
221221 echo "Creating manifest for architectures: $ARCHS"
222222
0 commit comments