File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 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+ ARCH_LIST=$(nix run .#archs --quiet)
81+ echo "Generated Archs:"
82+ echo "$ARCH_LIST"
8183 echo "arch_list=$ARCH_LIST" >> $GITHUB_OUTPUT
8284
8385 build :
@@ -193,11 +195,6 @@ jobs:
193195 docker load < ./result
194196 docker tag grhooks:${{ env.VERSION }} ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ matrix.arch }}
195197
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-
201198 docker-publish :
202199 runs-on : ubuntu-latest
203200 needs : [setup, generate-matrix, docker-build]
@@ -216,7 +213,7 @@ jobs:
216213 - name : Create and push manifest
217214 run : |
218215 IMAGE=ghcr.io/${{ env.REPOSITORY }}/grhooks:${{ env.VERSION }}
219- ARCHS=' ${{ needs.generate-matrix.outputs.arch_list }}'
216+ ARCHS=" ${{ needs.generate-matrix.outputs.arch_list }}"
220217
221218 echo "Creating manifest for architectures: $ARCHS"
222219
Original file line number Diff line number Diff line change 108108 else ".#toTarball" ;
109109 } ) formats
110110 ) architectures ) ) ;
111+
112+ archList = uniqueBy ( i : i . arch ) architectures ;
113+ generatedArchJson = builtins . toJSON archList ;
111114 in
112115 {
113116 devShells = lib . listToAttrs ( map ( { arch , os , target , ... } : {
128131 } ) architectures ) ) // ( pkgs . lib . listToAttrs ( map ( { arch , ...} @ args : {
129132 name = "image-${ arch } " ;
130133 value = containerPkg args ;
131- } )
132- ( uniqueBy ( i : i . arch ) architectures )
133- ) ) ;
134+ } ) archList ) ) ;
134135
135136 apps = {
136137 help = {
163164 echo '${ generatedMatrixJson } '
164165 '' ) ;
165166 } ;
167+
168+ archs = {
169+ type = "app" ;
170+ program = toString ( pkgs . writeScript "generate-arch-list" ''
171+ #!/bin/sh
172+ echo '${ generatedArchJson } '
173+ '' ) ;
174+ } ;
166175 } ;
167176
168177 bundlers = let
You can’t perform that action at this time.
0 commit comments