Skip to content

feat: introducing distroless-python #1

feat: introducing distroless-python

feat: introducing distroless-python #1

Workflow file for this run

name: main
on:
push:
- 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 }}
continue-on-error: ${{ matrix.experimental }}
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 }}
-
name: build
id: docker_build
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 and push
uses: docker/build-push-action@v6
with:
push: false
pull: false
load: true
context: "."
file: Dockerfile.alpine
build-args:
- ALPINE_VERSION=${{ steps.docker_build.outputs.ALPINE_VERSION }}
- BASE_IMAGE_DIGEST=${{ steps.docker_build.outputs.BASE_IMAGE_DIGEST }}
- PYTHON_VERSION=${{ steps.docker_build.outputs.PYTHON_VERSION }}
- SOURCE_IMAGE=${{ steps.docker_build.outputs.SOURCE_IMAGE }}
- BUILD_ROOT="/d"
tags:
- ${{ steps.docker_build.outputs.REPO_TAG }}