mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-07 03:00:34 -07:00
Refactor using reusable GHA workflows
This commit is contained in:
parent
2462d61dc8
commit
a0805cc3fe
16 changed files with 172 additions and 809 deletions
67
.github/workflows/build-docker-image.yml
vendored
Normal file
67
.github/workflows/build-docker-image.yml
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
name: Build Docker Image for ansible-test
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
registry:
|
||||
required: true
|
||||
type: string
|
||||
image_name:
|
||||
required: true
|
||||
type: string
|
||||
context:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# https://github.com/docker/login-action
|
||||
- name: Log into registry ${{ inputs.registry }}
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ inputs.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:
|
||||
"${{ inputs.registry }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ inputs.image_name }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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: ${{ inputs.context }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/mariadb103-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-mariadb103-py38-mysqlclient201
|
||||
CONTEXT: test-containers/mariadb103-py38-mysqlclient201
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py38-mysqlclient201
|
||||
context: test-containers/mariadb103-py38-mysqlclient201
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/mariadb103-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py38-pymysql093.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-mariadb103-py38-pymysql093
|
||||
CONTEXT: test-containers/mariadb103-py38-pymysql093
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py38-pymysql093
|
||||
context: test-containers/mariadb103-py38-pymysql093
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/mariadb103-py39-mysqlclient203/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py39-mysqlclient203.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-mariadb103-py39-mysqlclient203
|
||||
CONTEXT: test-containers/mariadb103-py39-mysqlclient203
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py39-mysqlclient203
|
||||
context: test-containers/mariadb103-py39-mysqlclient203
|
||||
|
|
|
@ -7,58 +7,12 @@ on:
|
|||
- 'test-containers/mariadb103-py39-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py39-pymysql093.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-mariadb103-py39-pymysql093
|
||||
CONTEXT: test-containers/mariadb103-py39-pymysql093
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py39-pymysql093
|
||||
context: test-containers/mariadb103-py39-pymysql093
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/mariadb106-py310-mysqlclient211/**'
|
||||
- '.github/workflows/docker-image-mariadb106-py310-mysqlclient211.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-mariadb106-py310-mysqlclient211
|
||||
CONTEXT: test-containers/mariadb106-py310-mysqlclient211
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb106-py310-mysqlclient211
|
||||
context: test-containers/mariadb106-py310-mysqlclient211
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/mariadb106-py310-pymysql102/**'
|
||||
- '.github/workflows/docker-image-mariadb106-py310-pymysql102.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-mariadb106-py310-pymysql102
|
||||
CONTEXT: test-containers/mariadb106-py310-pymysql102
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb106-py310-pymysql102
|
||||
context: test-containers/mariadb106-py310-pymysql102
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my57-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-my57-py38-mysqlclient201.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my57-py38-mysqlclient201
|
||||
CONTEXT: test-containers/my57-py38-mysqlclient201
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my57-py38-mysqlclient201
|
||||
context: test-containers/my57-py38-mysqlclient201
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my57-py38-pymysql0711/**'
|
||||
- '.github/workflows/docker-image-my57-py38-pymysql0711.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my57-py38-pymysql0711
|
||||
CONTEXT: test-containers/my57-py38-pymysql0711
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my57-py38-pymysql0711
|
||||
context: test-containers/my57-py38-pymysql0711
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my57-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-my57-py38-pymysql093.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my57-py38-pymysql093
|
||||
CONTEXT: test-containers/my57-py38-pymysql093
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my57-py38-pymysql093
|
||||
context: test-containers/my57-py38-pymysql093
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my80-py310-mysqlclient211/**'
|
||||
- '.github/workflows/docker-image-my80-py310-mysqlclient211.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my80-py310-mysqlclient211
|
||||
CONTEXT: test-containers/my80-py310-mysqlclient211
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py310-mysqlclient211
|
||||
context: test-containers/my80-py310-mysqlclient211
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my80-py310-pymysql102/**'
|
||||
- '.github/workflows/docker-image-my80-py310-pymysql102.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my80-py310-pymysql102
|
||||
CONTEXT: test-containers/my80-py310-pymysql102
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py310-pymysql102
|
||||
context: test-containers/my80-py310-pymysql102
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my80-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-my80-py38-mysqlclient201.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my80-py38-mysqlclient201
|
||||
CONTEXT: test-containers/my80-py38-mysqlclient201
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py38-mysqlclient201
|
||||
context: test-containers/my80-py38-mysqlclient201
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my80-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-my80-py38-pymysql093.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my80-py38-pymysql093
|
||||
CONTEXT: test-containers/my80-py38-pymysql093
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py38-pymysql093
|
||||
context: test-containers/my80-py38-pymysql093
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my80-py39-mysqlclient203/**'
|
||||
- '.github/workflows/docker-image-my80-py39-mysqlclient203.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my80-py39-mysqlclient203
|
||||
CONTEXT: test-containers/my80-py39-mysqlclient203
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py39-mysqlclient203
|
||||
context: test-containers/my80-py39-mysqlclient203
|
||||
|
|
|
@ -7,59 +7,12 @@ on:
|
|||
- 'test-containers/my80-py39-pymysql093/*'
|
||||
- '.github/workflows/docker-image-my80-py39-pymysql093.yml'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: test-container-my80-py39-pymysql093
|
||||
CONTEXT: test-containers/my80-py39-pymysql093
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# Requirement to use 'context' in docker/build-push-action@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# 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 }}\
|
||||
/${{ github.repository }}\
|
||||
/${{ env.IMAGE_NAME }}"
|
||||
tags: latest
|
||||
|
||||
# Setting up Docker Buildx with docker-container driver is required
|
||||
# at the moment to be able to use a subdirectory with Git context
|
||||
#
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- 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
|
||||
call-workflow-passing-data:
|
||||
uses: build-docker-image.yml@main
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py39-pymysql093
|
||||
context: test-containers/my80-py39-pymysql093
|
||||
|
|
Loading…
Add table
Reference in a new issue