Skip to content

Add version (#154)

Add version (#154) #74

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:
image-build:
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main
with:
registry: "quay.io/konveyor"
image_name: "kantra"
containerfile: "./Dockerfile"
architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
pre_build_cmd: |
TAG=${GITHUB_REF_NAME/main/latest}
sed -i "s,FROM quay.io/konveyor/windup-shim\:latest,FROM quay.io/konveyor/windup-shim:${TAG}," Dockerfile
sed -i "s,FROM quay.io/konveyor/static-report\:latest,FROM quay.io/konveyor/static-report:${TAG}," Dockerfile
sed -i "s,FROM quay.io/konveyor/analyzer-lsp\:latest,FROM quay.io/konveyor/analyzer-lsp:${TAG}," Dockerfile
export BUILD_COMMIT=$(git rev-parse HEAD)
extra-args: |
--build-arg VERSION=${tag} --build-arg BUILD_COMMIT=${BUILD_COMMIT}
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}