mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-21 09:51:31 -07:00
Add latest release of actions and with a context
This commit is contained in:
parent
a849f92e2e
commit
f663ee6fb9
1 changed files with 15 additions and 12 deletions
|
@ -7,11 +7,12 @@ on:
|
||||||
- main
|
- main
|
||||||
- lie_tests_using_containers
|
- lie_tests_using_containers
|
||||||
paths:
|
paths:
|
||||||
- 'test-containers/mariadb103-py38-mysqlclient201/**'
|
- '${{ env.CONTEXT }}/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: mariadb103-py38-mysqlclient201
|
IMAGE_NAME: ${{ github.actor }}/test-container-mariadb103-py38-mysqlclient201
|
||||||
|
CONTEXT: test-containers/mariadb103-py38-mysqlclient201
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@ -39,31 +40,33 @@ jobs:
|
||||||
# with:
|
# with:
|
||||||
# cosign-release: 'v1.11.0'
|
# cosign-release: 'v1.11.0'
|
||||||
|
|
||||||
# Login against a Docker registry
|
|
||||||
# https://github.com/docker/login-action
|
# https://github.com/docker/login-action
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# Extract metadata (tags, labels) for Docker
|
|
||||||
# https://github.com/docker/metadata-action
|
# https://github.com/docker/metadata-action
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
# Build and push Docker image with Buildx
|
# 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
|
# https://github.com/docker/build-push-action
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image with Buildx
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: ${{ env.CONTEXT }}
|
||||||
push: ${{ github.event_name == 'push' }}
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue