From 1b4ae760ac21f22feb365f0a35cd624fdd593c18 Mon Sep 17 00:00:00 2001 From: Scott J Dickerson Date: Thu, 12 Sep 2024 11:06:07 -0400 Subject: [PATCH] :seedling: Image build, use variables for repo push To help out people building images in a fork, use github action variables to be able to configure the target registry and image names. Now on a fork, the destination of an image build can be set by using Action Variables: - IMAGE_BUILD_REGISTRY (default: "quay.io/konveyor") - IMAGE_BUILD_IMAGE_NAME (default: "tackle2-ui") and secrets: - QUAY_PUBLISH_ROBOT - QUAY_PUBLISH_TOKEN Signed-off-by: Scott J Dickerson --- .github/workflows/image-build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml index 7bcbcc5fff..82a301accb 100644 --- a/.github/workflows/image-build.yaml +++ b/.github/workflows/image-build.yaml @@ -13,12 +13,16 @@ concurrency: group: build-${{ github.ref }} cancel-in-progress: true +# env: +# target_registry: ${{ vars.IMAGE_BUILD_REGISTRY || 'quay.io/konveyor' }} +# target_image_name: ${{ vars.IMAGE_BUILD_IMAGE_NAME || 'tackle2-ui' }} + jobs: image-build: uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main with: - registry: "quay.io/konveyor" - image_name: "tackle2-ui" + registry: ${{ vars.IMAGE_BUILD_REGISTRY || 'quay.io/konveyor' }} + image_name: ${{ vars.IMAGE_BUILD_IMAGE_NAME || 'tackle2-ui' }} containerfile: "./Dockerfile" # keep the architectures in sync with `ci-image-build.yml`