81 lines
2.2 KiB
YAML
81 lines
2.2 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.11"]
|
|
# alpine: ["3.15", "3.16", "3.17"]
|
|
include:
|
|
- python: "3.10.6"
|
|
alpine: "3.16"
|
|
# exclude:
|
|
# - python: 3.11.1
|
|
# alpine: "3.15"
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- 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:
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
- id: string
|
|
uses: ASzc/change-string-case-action@v5
|
|
with:
|
|
string: ${{ github.repository_owner }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
build-args: |
|
|
PYTHON_VERSION=${{ matrix.python }}
|
|
ALPINE_VERSION=${{ matrix.alpine }}
|
|
context: .
|
|
file: ./Docker/Dockerfile.base
|
|
push: true
|
|
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/web-base:${{ matrix.python }}-alpine${{ matrix.alpine }}
|
|
|
|
# - name: Poetry Meta
|
|
# id: meta-web-poetry
|
|
# uses: docker/metadata-action@v3
|
|
# with:
|
|
# images: |
|
|
# ghcr.io/${{ github.repository_owner }}/web-base
|
|
#
|
|
# - name: Set up Docker Buildx
|
|
# uses: docker/setup-buildx-action@v2
|
|
# with:
|
|
# platforms: linux/amd64,linux/arm64
|
|
# build-args: |
|
|
# PYTHON_VERSION=${{ matrix.python }}
|
|
# ALPINE_VERSION=${{ matrix.alpine }}
|
|
#
|
|
# - name: Build and push Poetry
|
|
# uses: docker/build-push-action@v2
|
|
# with:
|
|
# context: .
|
|
# file: ./Docker/Dockerfile.poetry
|
|
# platforms: linux/amd64,linux/arm64
|
|
# push: true
|
|
# tags: ${{ matrix.python }}-alpine${{ matrix.alpine }}
|