Skip to content

🐛 Fix Duplicate ID in GH Action (#118) #54

🐛 Fix Duplicate ID in GH Action (#118)

🐛 Fix Duplicate ID in GH Action (#118) #54

name: 'Build and Push Multi-Arch Image'
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'release-*'
tags:
- 'v*'
concurrency:
group: march-build-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-image-build:
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main
with:
registry: "quay.io/konveyor"
image_name: "static-report"
containerfile: "./Dockerfile"
architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
extra-args: "--build-arg VERSION=${{ github.ref_name }} --ulimit nofile=4096:4096"
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
windows-image-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Login to Docker Hub
uses: docker/login-action@master
with:
registry: "quay.io/konveyor"
username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
- name: Build static-report
run: |
docker build -f ./Dockerfile.windows -t quay.io/konveyor/static-report:ltsc2022-$env:TAG .
docker push quay.io/konveyor/static-report:ltsc2022-$env:TAG
env:
TAG: ${{ github.ref_name }}
- name: Retag and push image
run: |
docker tag quay.io/konveyor/static-report:ltsc2022-main quay.io/konveyor/static-report:ltsc2022-latest
docker push quay.io/konveyor/static-report:ltsc2022-latest
if: ${{ github.ref == 'refs/heads/main' }}
update-manifest:
needs:
- linux-image-build
- windows-image-build
runs-on: ubuntu-latest
steps:
- name: update manifest
run: |
podman manifest create temp
podman manifest add temp --all quay.io/konveyor/static-report:${{ github.ref_name }}
podman manifest add temp --all quay.io/konveyor/static-report:ltsc2022-${{ github.ref_name }}
podman tag temp quay.io/konveyor/static-report:${{ github.ref_name }}
- name: Push manifest to Quay
uses: redhat-actions/push-to-registry@main
id: push
with:
image: ${{ inputs.image_name }}
tags: ${{ env.tag }}
username: ${{ secrets.registry_username }}
password: ${{ secrets.registry_password }}
registry: ${{ inputs.registry }}
- name: Retag manifest
run: |
podman tag quay.io/konveyor/static-report:main quay.io/konveyor/static-report:latest
if: ${{ github.ref == 'refs/heads/main' }}
- name: Push retagged manifest to Quay
uses: redhat-actions/push-to-registry@main
id: push-latest
with:
image: ${{ inputs.image_name }}
tags: latest
username: ${{ secrets.registry_username }}
password: ${{ secrets.registry_password }}
registry: ${{ inputs.registry }}
if: ${{ github.ref == 'refs/heads/main' }}