Skip to content

1.6.0

1.6.0 #36

Workflow file for this run

name: Release
on:
release:
types: [published]
env:
POETRY_VERSION: 1.6.0
GHCR_IMAGE_REPOSITORY: ghcr.io/${{ github.repository_owner }}/poetry
PLATFORMS: linux/amd64,linux/arm64/v8
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
variant:
- buster
- slim
include:
- python: "3.11"
is_default_python: true
- variant: buster
is_default_variant: true
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
with:
platforms: ${{ env.PLATFORMS }}
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Python + Variant: ${{ env.POETRY_VERSION }}-python-${{ matrix.python }}-${{ matrix.variant }}"
uses: docker/build-push-action@v3.1.0
with:
push: true
tags: ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ env.POETRY_VERSION }}-python-${{ matrix.python }}-${{ matrix.variant }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ env.PLATFORMS }}
build-args: |
POETRY_VERSION=${{ env.POETRY_VERSION }}
PYTHON_VERSION=${{ matrix.python }}
VARIANT=${{ matrix.variant }}
- name: "Python + Default Variant: ${{ env.POETRY_VERSION }}-python-${{ matrix.python }}"
uses: docker/build-push-action@v3.1.0
if: matrix.is_default_variant
with:
push: true
tags: ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ env.POETRY_VERSION }}-python-${{ matrix.python }}
platforms: ${{ env.PLATFORMS }}
build-args: |
POETRY_VERSION=${{ env.POETRY_VERSION }}
PYTHON_VERSION=${{ matrix.python }}
VARIANT=${{ matrix.variant }}
- name: "Default Python + Variant: ${{ env.POETRY_VERSION }}-${{ matrix.variant }}"
uses: docker/build-push-action@v3.1.0
if: matrix.is_default_python
with:
push: true
tags: ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ env.POETRY_VERSION }}-${{ matrix.variant }}
platforms: ${{ env.PLATFORMS }}
build-args: |
POETRY_VERSION=${{ env.POETRY_VERSION }}
PYTHON_VERSION=${{ matrix.python }}
VARIANT=${{ matrix.variant }}
- name: "Default Python + Default Variant: ${{ env.POETRY_VERSION }}"
uses: docker/build-push-action@v3.1.0
if: matrix.is_default_python && matrix.is_default_variant
with:
push: true
tags: ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ env.POETRY_VERSION }}
platforms: ${{ env.PLATFORMS }}
build-args: |
POETRY_VERSION=${{ env.POETRY_VERSION }}
PYTHON_VERSION=${{ matrix.python }}
VARIANT=${{ matrix.variant }}