mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-03-15 11:53:31 +00:00
Get rid of unmaintained redhat-actions/push-to-registry action. (#1249)
This commit is contained in:
parent
15690313f3
commit
e02d4d06af
35
.github/workflows/docker-images.yml
vendored
35
.github/workflows/docker-images.yml
vendored
@ -28,7 +28,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build image ${{ matrix.name }}:${{ matrix.tag }}
|
name: Build image ${{ matrix.name }}:${{ matrix.tag }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -53,10 +53,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get install podman buildah
|
sudo apt-get install podman buildah
|
||||||
|
|
||||||
- name: Set up Go 1.22
|
- name: Set up Go 1.26
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
go-version: '1.26'
|
||||||
cache: false # true (default) results in warnings since we don't use Go modules
|
cache: false # true (default) results in warnings since we don't use Go modules
|
||||||
|
|
||||||
- name: Build ${{ matrix.name }} image
|
- name: Build ${{ matrix.name }} image
|
||||||
@ -66,25 +66,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Tag image as latest
|
- name: Tag image as latest
|
||||||
if: matrix.tag-as-latest && matrix.tag != 'latest'
|
if: matrix.tag-as-latest && matrix.tag != 'latest'
|
||||||
run: |
|
env:
|
||||||
podman tag "${CONTAINER_REGISTRY}/${{ matrix.name }}:${{ matrix.tag }}" "${CONTAINER_REGISTRY}/${{ matrix.name }}:latest"
|
SOURCE_IMAGE: ${{ matrix.name }}:${{ matrix.tag }}
|
||||||
|
DEST_IMAGE: ${{ matrix.name }}:latest
|
||||||
|
run: >-
|
||||||
|
podman tag "${CONTAINER_REGISTRY}/${SOURCE_IMAGE}" "${CONTAINER_REGISTRY}/${DEST_IMAGE}"
|
||||||
|
|
||||||
- name: Publish container image ${{ env.CONTAINER_REGISTRY }}/${{ matrix.name }}:${{ matrix.tag }}
|
- 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
|
env:
|
||||||
with:
|
IMAGE: ${{ matrix.name }}:${{ matrix.tag }}
|
||||||
registry: ${{ env.CONTAINER_REGISTRY }}
|
run: >-
|
||||||
image: ${{ matrix.name }}
|
podman push "${IMAGE}" "${CONTAINER_REGISTRY}/${IMAGE}" --tls-verify=true --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
|
||||||
tags: ${{ matrix.tag }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish container image ${{ env.CONTAINER_REGISTRY }}/${{ matrix.name }}:latest
|
- name: Publish container image ${{ env.CONTAINER_REGISTRY }}/${{ matrix.name }}:latest
|
||||||
if: github.event_name != 'pull_request' && matrix.tag-as-latest && matrix.tag != 'latest'
|
if: github.event_name != 'pull_request' && matrix.tag-as-latest && matrix.tag != 'latest'
|
||||||
uses: redhat-actions/push-to-registry@v2
|
env:
|
||||||
with:
|
IMAGE: ${{ matrix.name }}:latest
|
||||||
registry: ${{ env.CONTAINER_REGISTRY }}
|
run: >-
|
||||||
image: ${{ matrix.name }}
|
podman push "${IMAGE}" "${CONTAINER_REGISTRY}/${IMAGE}" --tls-verify=true --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
|
||||||
tags: latest
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user