Fix workflow to work both on fork and c.mysql repository

This commit is contained in:
Laurent Indermuehle 2023-02-01 14:03:46 +01:00
commit 2ce768b880
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
14 changed files with 97 additions and 98 deletions

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb103-py38-pymysql093 IMAGE_NAME: test-container-mariadb103-py38-pymysql093
CONTEXT: test-containers/mariadb103-py38-pymysql093 CONTEXT: test-containers/mariadb103-py38-pymysql093
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb103-py39-mysqlclient203 IMAGE_NAME: test-container-mariadb103-py39-mysqlclient203
CONTEXT: test-containers/mariadb103-py39-mysqlclient203 CONTEXT: test-containers/mariadb103-py39-mysqlclient203
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb103-py39-pymysql093 IMAGE_NAME: test-container-mariadb103-py39-pymysql093
CONTEXT: test-containers/mariadb103-py39-pymysql093 CONTEXT: test-containers/mariadb103-py39-pymysql093
jobs: jobs:
@ -39,7 +39,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +50,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +58,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb106-py310-mysqlclient211 IMAGE_NAME: test-container-mariadb106-py310-mysqlclient211
CONTEXT: test-containers/mariadb106-py310-mysqlclient211 CONTEXT: test-containers/mariadb106-py310-mysqlclient211
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb106-py310-pymysql102 IMAGE_NAME: test-container-mariadb106-py310-pymysql102
CONTEXT: test-containers/mariadb106-py310-pymysql102 CONTEXT: test-containers/mariadb106-py310-pymysql102
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my57-py38-mysqlclient201 IMAGE_NAME: test-container-my57-py38-mysqlclient201
CONTEXT: test-containers/my57-py38-mysqlclient201 CONTEXT: test-containers/my57-py38-mysqlclient201
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my57-py38-pymysql0711 IMAGE_NAME: test-container-my57-py38-pymysql0711
CONTEXT: test-containers/my57-py38-pymysql0711 CONTEXT: test-containers/my57-py38-pymysql0711
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my57-py38-pymysql093 IMAGE_NAME: test-container-my57-py38-pymysql093
CONTEXT: test-containers/my57-py38-pymysql093 CONTEXT: test-containers/my57-py38-pymysql093
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my80-py310-mysqlclient211 IMAGE_NAME: test-container-my80-py310-mysqlclient211
CONTEXT: test-containers/my80-py310-mysqlclient211 CONTEXT: test-containers/my80-py310-mysqlclient211
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my80-py310-pymysql102 IMAGE_NAME: test-container-my80-py310-pymysql102
CONTEXT: test-containers/my80-py310-pymysql102 CONTEXT: test-containers/my80-py310-pymysql102
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my80-py38-mysqlclient201 IMAGE_NAME: test-container-my80-py38-mysqlclient201
CONTEXT: test-containers/my80-py38-mysqlclient201 CONTEXT: test-containers/my80-py38-mysqlclient201
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my80-py38-pymysql093 IMAGE_NAME: test-container-my80-py38-pymysql093
CONTEXT: test-containers/my80-py38-pymysql093 CONTEXT: test-containers/my80-py38-pymysql093
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my80-py39-mysqlclient203 IMAGE_NAME: test-container-my80-py39-mysqlclient203
CONTEXT: test-containers/my80-py39-mysqlclient203 CONTEXT: test-containers/my80-py39-mysqlclient203
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/test-container-my80-py39-pymysql093 IMAGE_NAME: test-container-my80-py39-pymysql093
CONTEXT: test-containers/my80-py39-pymysql093 CONTEXT: test-containers/my80-py39-pymysql093
jobs: jobs:
@ -22,6 +22,7 @@ jobs:
packages: write packages: write
steps: steps:
# Requirement to use 'context' in docker/build-push-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,7 +40,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -47,10 +51,6 @@ jobs:
# https://github.com/docker/setup-buildx-action # https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with:
# Use the previous version of buildx https://github.com/docker/buildx/releases
# to solve https://github.com/docker/build-push-action/issues/761
version: v0.9.1
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image with Buildx - name: Build and push Docker image with Buildx
@ -59,7 +59,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max