mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 11:58:43 +00:00
Publish test images under another tag to work around strange behavior of Compose's pull policy. (#901)
This commit is contained in:
parent
d334c2362f
commit
37c639f6e8
23
.github/workflows/docker-images.yml
vendored
23
.github/workflows/docker-images.yml
vendored
@ -34,9 +34,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: simple-1
|
- name: simple-1
|
||||||
tag: latest
|
tag: tag
|
||||||
|
tag-as-latest: true
|
||||||
- name: simple-2
|
- name: simple-2
|
||||||
tag: latest
|
tag: tag
|
||||||
|
tag-as-latest: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
@ -56,7 +58,12 @@ jobs:
|
|||||||
./build.sh "${CONTAINER_REGISTRY}/${{ matrix.name }}:${{ matrix.tag }}"
|
./build.sh "${CONTAINER_REGISTRY}/${{ matrix.name }}:${{ matrix.tag }}"
|
||||||
working-directory: tests/images/${{ matrix.name }}
|
working-directory: tests/images/${{ matrix.name }}
|
||||||
|
|
||||||
- name: Publish container image as ${{ env.CONTAINER_REGISTRY }}/${{ matrix.name }}:latest
|
- name: Tag image as latest
|
||||||
|
if: matrix.tag-as-latest && matrix.tag != 'latest'
|
||||||
|
run: |
|
||||||
|
podman tag "${CONTAINER_REGISTRY}/${{ matrix.name }}:${{ matrix.tag }}" "${CONTAINER_REGISTRY}/${{ matrix.name }}:latest"
|
||||||
|
|
||||||
|
- name: Publish container image ${{ env.CONTAINER_REGISTRY }}/${{ matrix.name }}:${{ matrix.tag }}
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: redhat-actions/push-to-registry@v2
|
uses: redhat-actions/push-to-registry@v2
|
||||||
with:
|
with:
|
||||||
@ -65,3 +72,13 @@ jobs:
|
|||||||
tags: ${{ matrix.tag }}
|
tags: ${{ matrix.tag }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Publish container image ${{ env.CONTAINER_REGISTRY }}/${{ matrix.name }}:latest
|
||||||
|
if: github.event_name != 'pull_request' && matrix.tag-as-latest && matrix.tag != 'latest'
|
||||||
|
uses: redhat-actions/push-to-registry@v2
|
||||||
|
with:
|
||||||
|
registry: ${{ env.CONTAINER_REGISTRY }}
|
||||||
|
image: ${{ matrix.name }}
|
||||||
|
tags: latest
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user