71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
name: Push web base image
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
release:
|
|
types: [published, created, edited]
|
|
pull_request:
|
|
jobs:
|
|
build_base_image:
|
|
strategy:
|
|
matrix:
|
|
python: ["3.8", "3.9", "3.10", "3.10.9", "3.11", "3.12"]
|
|
alpine: ["3.16", "3.17", "3.18", "3.19"]
|
|
include:
|
|
- python: "3.10.6"
|
|
alpine: "3.16"
|
|
exclude:
|
|
- python: 3.10.9
|
|
alpine: "3.15"
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Login to ghcr
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
driver-opts: |
|
|
image=moby/buildkit:v0.10.6
|
|
|
|
- id: string
|
|
uses: ASzc/change-string-case-action@v5
|
|
with:
|
|
string: ${{ github.repository_owner }}
|
|
|
|
- name: Build and push base
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
build-args: |
|
|
PYTHON_VERSION=${{ matrix.python }}
|
|
ALPINE_VERSION=${{ matrix.alpine }}
|
|
context: .
|
|
file: ./Docker/Dockerfile.base
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/web-base/python:${{ matrix.python }}-alpine${{ matrix.alpine }}
|
|
|
|
- name: Build and push Poetry
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
build-args: |
|
|
PYTHON_VERSION=${{ matrix.python }}
|
|
ALPINE_VERSION=${{ matrix.alpine }}
|
|
context: .
|
|
file: ./Docker/Dockerfile.poetry
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/web-base/poetry:${{ matrix.python }}-alpine${{ matrix.alpine }}
|