11name : Build
22
33on :
4- push :
5- pull_request :
6- workflow_dispatch :
7- schedule :
8- - cron : ' 40 7 * * 2'
9-
10-
4+ push :
5+ pull_request :
116
127jobs :
138
1712 matrix : ${{ steps.set-matrix.outputs.matrix }}
1813 steps :
1914 - id : set-matrix
20- run : echo "::set-output name=matrix::{\"include\":[{\"type\":\"amd64\",\"image\":\"amazon/aws-lambda-provided:al2\", \"arch\":\"x86_64\"},{\"type\":\"arm64\",\"image\":\"amazon/aws-lambda-provided:al2.2023.12.14.13 \", \"arch\":\"arm64\"}] }"
15+ run : echo "::set-output name=matrix::{\"include\":[{\"type\":\"amd64\",\"image\":\"amazon/aws-lambda-provided:al2\", \"arch\":\"x86_64\"},{\"type\":\"arm64\",\"image\":\"amazon/aws-lambda-provided:al2.2025.07.17.11-arm64 \", \"arch\":\"arm64\"}] }"
2116
2217
2318 containers :
@@ -41,18 +36,32 @@ jobs:
4136 echo "are we pushing packages" ${{ env.PUSH_PACKAGES }}
4237 echo "event_name" ${{ github.event_name }}
4338 echo "ref" ${{ github.ref }}
39+
40+ - name : Set up Docker
41+ uses : docker/setup-docker-action@v4
42+ with :
43+ daemon-config : |
44+ {
45+ "debug": false,
46+ "features": {
47+ "containerd-snapshotter": true
48+ }
49+ }
50+
4451 - name : Setup Docker Buildx
4552 id : buildx
4653 uses : docker/setup-buildx-action@v3
4754 with :
4855 version : latest
56+
4957 - if : ${{ env.PUSH_PACKAGES == 'true' }}
5058 name : Login to GitHub Container Registry
5159 uses : docker/login-action@v3
5260 with :
5361 registry : ghcr.io
5462 username : ${{ github.actor }}
5563 password : ${{ secrets.GITHUB_TOKEN }}
64+
5665 - name : Prepare
5766 id : prep
5867 run : |
6271 fi
6372 echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
6473 echo ::set-output name=VERSION::${VERSION}
74+
75+ # Extract metadata (tags, labels) for Docker
76+ # https://github.com/docker/metadata-action
77+ - name : Extract container metadata
78+ id : meta
79+ uses : docker/metadata-action@v5
80+ with :
81+ images : |
82+ ghcr.io/pdal/pdal
83+ docker.io/pdal/pdal
84+ tags : |
85+ type=ref,event=branch
86+ type=ref,event=pr
87+ type=semver,pattern={{version}}
88+ type=semver,pattern={{major}}.{{minor}}
89+
6590 - name : Build image
66- uses : docker/build-push-action@v5
91+ uses : docker/build-push-action@v6
6792 with :
6893 push : ${{ env.PUSH_PACKAGES == 'true' }}
6994 builder : ${{ steps.buildx.outputs.name }}
@@ -85,3 +110,11 @@ jobs:
85110 org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }}
86111 org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
87112
113+ - name : Generate artifact attestation
114+ if : ${{ env.PUSH_PACKAGES == 'true' }}
115+ uses : actions/attest-build-provenance@v2
116+ with :
117+ subject-name : ghcr.io/pdal/pdal
118+ subject-digest : ${{ steps.push.outputs.digest }}
119+ push-to-registry : ${{ env.PUSH_PACKAGES == 'true' }}
120+
0 commit comments