From e02d4d06af28e5cced0a7b2c4f076ed6dae41133 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 14 Mar 2026 23:10:51 +0100 Subject: [PATCH] Get rid of unmaintained redhat-actions/push-to-registry action. (#1249) --- .github/workflows/docker-images.yml | 35 +++++++++++++---------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 1c93d5ae..1d72295f 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -28,7 +28,7 @@ env: jobs: build: name: Build image ${{ matrix.name }}:${{ matrix.tag }} - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -53,10 +53,10 @@ jobs: run: | sudo apt-get install podman buildah - - name: Set up Go 1.22 + - name: Set up Go 1.26 uses: actions/setup-go@v6 with: - go-version: '1.22' + go-version: '1.26' cache: false # true (default) results in warnings since we don't use Go modules - name: Build ${{ matrix.name }} image @@ -66,25 +66,22 @@ jobs: - 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" + env: + 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 }} if: github.event_name != 'pull_request' - uses: redhat-actions/push-to-registry@v2 - with: - registry: ${{ env.CONTAINER_REGISTRY }} - image: ${{ matrix.name }} - tags: ${{ matrix.tag }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + env: + IMAGE: ${{ matrix.name }}:${{ matrix.tag }} + run: >- + podman push "${IMAGE}" "${CONTAINER_REGISTRY}/${IMAGE}" --tls-verify=true --creds=${{ github.actor }}:${{ 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 }} + env: + IMAGE: ${{ matrix.name }}:latest + run: >- + podman push "${IMAGE}" "${CONTAINER_REGISTRY}/${IMAGE}" --tls-verify=true --creds=${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}