community.mysql/.github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml
2023-01-20 09:57:18 +01:00

108 lines
3.5 KiB
YAML

---
name: Docker Image CI mariadb103-py38-mysqlclient201
on:
push:
branch:
- main
- lie_tests_using_containers
paths:
- 'test-containers/mariadb103-py38-mysqlclient201/**'
- '.github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb103-py38-mysqlclient201
CONTEXT: test-containers/mariadb103-py38-mysqlclient201
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# - name: Build the Docker image
# run: docker build . --file Dockerfile --tag mariadb103-py38-mysqlclient201:$(date +%s)
# # Install the cosign tool
# # https://github.com/sigstore/cosign-installer
# - name: Install cosign
# uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
# with:
# cosign-release: 'v1.11.0'
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/metadata-action
- name: Extract Docker metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx
id: build-and-push
uses: docker/build-push-action@v3
with:
context: ${{ env.CONTEXT }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# # Sign the resulting Docker image digest.
# # This will only write to the public Rekor transparency log when the Docker
# # repository is public to avoid leaking data. If you would like to publish
# # transparency data even for private images, pass --force to cosign below.
# # https://github.com/sigstore/cosign
# - name: Sign the published Docker image
# env:
# COSIGN_EXPERIMENTAL: "true"
# # This step uses the identity token to provision an ephemeral certificate
# # against the sigstore community Fulcio instance.
# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
# mariadb103-py38-mysqlclient201
# mariadb103-py38-pymysql093
# mariadb103-py39-mysqlclient203
# mariadb103-py39-pymysql093
# mariadb106-py310-mysqlclient211
# mariadb106-py310-pymysql093
# mariadb106-py310-pymysql102
# my57-py38-mysqlclient201
# my57-py38-pymysql0711
# my57-py38-pymysql093
# my80-py310-mysqlclient211
# my80-py310-pymysql093
# my80-py310-pymysql102
# my80-py38-mysqlclient201
# my80-py38-pymysql0711
# my80-py38-pymysql093
# my80-py39-mysqlclient203
# my80-py39-pymysql0711
# my80-py39-pymysql093