Skip to content

feat: introducing distroless-python #6

feat: introducing distroless-python

feat: introducing distroless-python #6

Workflow file for this run

name: main
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
docker:
strategy:
fail-fast: false
matrix:
experimental: [false]
arch:
- 'x64'
python:
- '3.12'
alpine:
- '3.20'
os:
- 'ubuntu-latest'
runs-on: ${{ matrix.os }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
id: image_env
run: |
. ./env.sh '${{ matrix.alpine }}' '${{ matrix.python }}' '${{ github.repository_owner }}'
docker pull "${SOURCE_IMAGE}"
echo ALPINE_VERSION="${ALPINE_VERSION}" >> "$GITHUB_OUTPUT"
echo PYTHON_VERSION="${PYTHON_VERSION}" >> "$GITHUB_OUTPUT"
echo SOURCE_IMAGE="${SOURCE_IMAGE}" >> "$GITHUB_OUTPUT"
echo REPO_TAG="${REPO_TAG}" >> "$GITHUB_OUTPUT"
echo BASE_IMAGE_DIGEST="$(digest_of "$SOURCE_IMAGE")" >> "$GITHUB_OUTPUT"
-
name: Build deps
uses: docker/build-push-action@v6
with:
push: false
pull: false
load: true
context: "."
file: Dockerfile.alpine
target: builder
cache-from:
- type=registry,ref=${{ steps.image_env.outputs.REPO_TAG }}-buildroot

Check failure on line 66 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / main

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 66, Col: 15): A sequence was not expected .github/workflows/main.yml (Line: 68, Col: 15): A sequence was not expected
cache-to:
- type=registry,ref=${{ steps.image_env.outputs.REPO_TAG }}-buildroot,mode=max
build-args: |
ALPINE_VERSION=${{ steps.image_env.outputs.ALPINE_VERSION }}
BASE_IMAGE_DIGEST=${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
PYTHON_VERSION=${{ steps.image_env.outputs.PYTHON_VERSION }}
SOURCE_IMAGE=${{ steps.image_env.outputs.SOURCE_IMAGE }}
BUILD_ROOT=/d
tags: "${{ steps.image_env.outputs.REPO_TAG }}-buildroot"
-
name: Build
uses: docker/build-push-action@v6
with:
push: false
pull: false
load: true
context: "."
file: Dockerfile.alpine
cache-from:
- type=registry,ref=${{ steps.image_env.outputs.REPO_TAG }}
- type=registry,ref=${{ steps.image_env.outputs.REPO_TAG }}-buildroot
- type=registry,ref=${{ steps.image_env.outputs.SOURCE_IMAGE }}
build-args: |
ALPINE_VERSION=${{ steps.image_env.outputs.ALPINE_VERSION }}
BASE_IMAGE_DIGEST=${{ steps.image_env.outputs.BASE_IMAGE_DIGEST }}
PYTHON_VERSION=${{ steps.image_env.outputs.PYTHON_VERSION }}
SOURCE_IMAGE=${{ steps.image_env.outputs.SOURCE_IMAGE }}
BUILD_ROOT=/d
tags: "${{ steps.image_env.outputs.REPO_TAG }}"