Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 42 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Build

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '40 7 * * 2'


push:
pull_request:

jobs:

Expand All @@ -17,7 +12,7 @@ jobs:
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.2023.12.14.13\", \"arch\":\"arm64\"}] }"
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:
Expand All @@ -41,18 +36,32 @@ jobs:
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: |
Expand All @@ -62,8 +71,24 @@ jobs:
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@v5
uses: docker/build-push-action@v6
with:
push: ${{ env.PUSH_PACKAGES == 'true' }}
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -85,3 +110,11 @@ jobs:
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' }}

2 changes: 1 addition & 1 deletion docker/Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ENV PATH $PATH:${CONDAENV}/bin
ENV LD_LIBRARY_PATH=${CONDAENV}/lib
ENV HOME=/var/task/

RUN /var/task/bin/python -m pip install awslambdaric==2.0.11
RUN /var/task/bin/python -m pip install awslambdaric==3.1.1
ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-${RIE_ARCH} /usr/bin/aws-lambda-rie

RUN chmod +x /usr/bin/aws-lambda-rie
Expand Down