Skip to content

Bump docker/build-push-action from 3.3.1 to 7.0.0 #95

Bump docker/build-push-action from 3.3.1 to 7.0.0

Bump docker/build-push-action from 3.3.1 to 7.0.0 #95

Workflow file for this run

name: CI
on:
push:
paths:
- 'Dockerfile'
- 'requirements.txt'
- 'scripts/create-lambda-layer.sh'
- 'scripts/deploy.py'
- '.github/workflows/ci.yml'
env:
PYTHON_VERSION: '3.12'
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python 3.12
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: 3.12
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2
- name: Login to DockerHub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
platforms: linux/amd64
context: .
load: true
push: false
tags: devseed/titiler-layer:latest
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
- name: Create Package
run: |
docker run \
--platform=linux/amd64 \
--entrypoint bash \
-v ${{ github.workspace }}:/local \
--rm devseed/titiler-layer:latest \
/local/scripts/create-lambda-layer.sh
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Set module version
id: titiler_version
run: |
echo version=$(docker run --platform=linux/amd64 --entrypoint '' --rm devseed/titiler-layer:latest python -c'import titiler.core; print(titiler.core.__version__)') >> $GITHUB_OUTPUT
- name: Print Version
run: |
echo "${{ steps.titiler_version.outputs.version }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install boto3 click
- name: Deploy layers
if: github.ref == 'refs/heads/main'
run: python scripts/deploy.py ${{ env.PYTHON_VERSION }} ${{ steps.titiler_version.outputs.version }}