another path issue #58
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| config: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - id: set-matrix | |
| 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\"}] }" | |
| containers: | |
| needs: config | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| strategy: | |
| fail-fast: true | |
| matrix: ${{fromJson(needs.config.outputs.matrix)}} | |
| env: | |
| PUSH_PACKAGES: ${{ github.repository_owner == 'PDAL' && github.event_name != 'pull_request'}} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Lint | |
| id: lint | |
| run: | | |
| echo "are we pushing packages" ${{ env.PUSH_PACKAGES }} | |
| echo "event_name" ${{ github.event_name }} | |
| echo "ref" ${{ github.ref }} | |
| - name: Set up Docker | |
| uses: docker/setup-docker-action@v4 | |
| with: | |
| daemon-config: | | |
| { | |
| "debug": false, | |
| "features": { | |
| "containerd-snapshotter": true | |
| } | |
| } | |
| - name: Setup Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| version: latest | |
| - if: ${{ env.PUSH_PACKAGES == 'true' }} | |
| name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare | |
| id: prep | |
| run: | | |
| VERSION=sha-${GITHUB_SHA::8} | |
| if [[ $GITHUB_REF == refs/tags/* ]]; then | |
| VERSION=${GITHUB_REF/refs\/tags\//} | |
| fi | |
| echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ') | |
| echo ::set-output name=VERSION::${VERSION} | |
| # Extract metadata (tags, labels) for Docker | |
| # https://github.com/docker/metadata-action | |
| - name: Extract container metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/pdal/pdal | |
| docker.io/pdal/pdal | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - name: Build image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ env.PUSH_PACKAGES == 'true' }} | |
| builder: ${{ steps.buildx.outputs.name }} | |
| context: . | |
| file: ./docker/Dockerfile.runner | |
| platforms: linux/${{ matrix.type}} | |
| build-args: | | |
| LAMBDA_IMAGE=${{ matrix.image }} | |
| RIE_ARCH=${{ matrix.arch }} | |
| tags: | | |
| ghcr.io/pdal/lambda:${{ steps.prep.outputs.VERSION }} | |
| ghcr.io/pdal/lambda:latest | |
| labels: | | |
| org.opencontainers.image.title=${{ github.event.repository.name }} | |
| org.opencontainers.image.description=${{ github.event.repository.description }} | |
| org.opencontainers.image.source=${{ github.event.repository.html_url }} | |
| org.opencontainers.image.url=${{ github.event.repository.html_url }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }} | |
| org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }} | |
| - name: Generate artifact attestation | |
| if: ${{ env.PUSH_PACKAGES == 'true' }} | |
| uses: actions/attest-build-provenance@v2 | |
| with: | |
| subject-name: ghcr.io/pdal/pdal | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: ${{ env.PUSH_PACKAGES == 'true' }} | |