From 14918d5dae47960df6e99bbaf34b5a380d0dbbc5 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Thu, 12 Sep 2024 16:23:11 -0400 Subject: [PATCH] :seedling: Image build, use variables for repo push (#2090) 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[^1]: - IMAGE_BUILD_REGISTRY (default: "quay.io/konveyor") - IMAGE_BUILD_IMAGE_NAME (default: "tackle2-ui") and action secrets[^2]: - QUAY_PUBLISH_ROBOT - QUAY_PUBLISH_TOKEN [^1]: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#creating-configuration-variables-for-a-repository [^2]: https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secret Signed-off-by: Scott J Dickerson --- .github/workflows/image-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml index 7bcbcc5fff..22b3ab25be 100644 --- a/.github/workflows/image-build.yaml +++ b/.github/workflows/image-build.yaml @@ -17,8 +17,8 @@ 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`