Skip to content

1.8.2

1.8.2 #45

Workflow file for this run

name: Release
on:
release:
types: [published]
env:
POETRY_VERSION: 1.8.2
GHCR_IMAGE_REPOSITORY: ghcr.io/${{ github.repository_owner }}/poetry
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
variant:
- bookworm
- slim
include:
- python: "3.12"
is_default_python: true
- variant: bookworm
is_default_variant: true
steps:
- uses: actions/checkout@v4.1.1
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image tags in env
run: |
TAG_SUFFIX="${{ matrix.python }}-${{ matrix.variant }}"
echo "GIT_SHA_TAG=${{ env.GHCR_IMAGE_REPOSITORY }}:${{ github.sha }}-${TAG_SUFFIX}" >> $GITHUB_ENV
echo "BASE_RELEASE_TAG=${{ env.GHCR_IMAGE_REPOSITORY }}:${{ env.POETRY_VERSION }}" >> $GITHUB_ENV
- name: "Python + Variant: ${{ env.POETRY_VERSION }}-python-${{ matrix.python }}-${{ matrix.variant }}"
run: |
RELEASE_TAG="${BASE_RELEASE_TAG}-python-${{ matrix.python }}-${{ matrix.variant }}"
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $RELEASE_TAG
docker push $RELEASE_TAG
- name: "Python + Default Variant: ${{ env.POETRY_VERSION }}-python-${{ matrix.python }}"
if: matrix.is_default_variant
run: |
RELEASE_TAG="${BASE_RELEASE_TAG}-python-${{ matrix.python }}"
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $RELEASE_TAG
docker push $RELEASE_TAG
- name: "Default Python + Variant: ${{ env.POETRY_VERSION }}-${{ matrix.variant }}"
if: matrix.is_default_python
run: |
RELEASE_TAG="${BASE_RELEASE_TAG}-${{ matrix.variant }}"
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $RELEASE_TAG
docker push $RELEASE_TAG
- name: "Default Python + Default Variant: ${{ env.POETRY_VERSION }}"
if: matrix.is_default_python && matrix.is_default_variant
run: |
docker pull $GIT_SHA_TAG
docker tag $GIT_SHA_TAG $BASE_RELEASE_TAG
docker push $BASE_RELEASE_TAG