44 workflow_dispatch :
55 push :
66 branches :
7- - main
7+ - master
8+ paths :
9+ - ' integration/**'
810
911jobs :
1012 generate-matrix :
1416 matrix : ${{ steps.set-matrix.outputs.matrix }}
1517 steps :
1618 - name : Checkout
17- uses : actions/checkout@v3
19+ uses : actions/checkout@v4
1820 with :
1921 persist-credentials : false
2022
@@ -28,26 +30,31 @@ jobs:
2830 split("\t") as $parts |
2931 {
3032 stage: $parts[0],
31- container: $parts[1],
3233 platform: ($parts[1] | split("-")[0]),
3334 platform_version: ($parts[1] | split("-")[1] // ""),
3435 }' | jq -s .)
3536
3637 echo "matrix=$(echo "$MATRIX" | jq -c .)" >> $GITHUB_OUTPUT
3738
38- build-containers :
39+ image :
3940 needs : generate-matrix
4041 runs-on : ubuntu-latest
41- permissions : {}
42+ permissions :
43+ packages : write
4244 strategy :
4345 matrix :
4446 include : ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
4547
4648 steps :
49+ - name : Checkout
50+ uses : actions/checkout@v4
51+ with :
52+ persist-credentials : false
53+
4754 - name : Determine Architectures
4855 id : arch
4956 run : |
50- CONTAINER="${{ matrix.container }}"
57+ CONTAINER="${{ matrix.platform }}-${{ matrix.platform_version }}"
5158 if [[ "$CONTAINER" == *aarch64* ]]; then
5259 echo "archs=linux/arm64" >> $GITHUB_OUTPUT
5360 elif [[ "$CONTAINER" == *x86_64* ]]; then
@@ -78,15 +85,15 @@ jobs:
7885 - name : Build and Push Image
7986 uses : docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
8087 with :
81- context : integration/linux/${{ matrix.stage }}/${{ matrix.container }}
88+ context : integration/linux/${{ matrix.stage }}/${{ matrix.platform }}-${{ matrix.platform_version }}
8289 push : true
8390 platforms : ${{ steps.arch.outputs.archs }}
8491 tags : |
85- ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.container }}:latest
86- ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.container }}:${{ steps.meta.outputs.date }}
92+ ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.platform }}-${{ matrix.platform_version }}:latest
93+ ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.platform }}-${{ matrix.platform_version }}:${{ steps.meta.outputs.date }}
8794 labels : |
8895 org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
8996 org.opencontainers.image.revision=${{ github.sha }}
9097 org.opencontainers.image.created=${{ steps.meta.outputs.date }}
91- cache-from : type=registry,dest =ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.container }}:cache
92- cache-to : type=registry,dest =ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.container }}:cache
98+ cache-from : type=registry,ref =ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.platform }}-${{ matrix.platform_version }}:cache
99+ cache-to : type=registry,ref =ghcr.io/${{ github.repository_owner }}/gelpkg-${{ matrix.stage }}-${{ matrix.platform }}-${{ matrix.platform_version }}:cache
0 commit comments