From 35cadf7e1877193b894d0321e56b285a6a8fde47 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Wed, 14 Feb 2024 17:21:28 +0900 Subject: [PATCH 1/3] Prepare RHEL workflow for secrets --- .github/workflows/images_build_rhel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/images_build_rhel.yml b/.github/workflows/images_build_rhel.yml index 708dd6d62..105f17759 100644 --- a/.github/workflows/images_build_rhel.yml +++ b/.github/workflows/images_build_rhel.yml @@ -23,7 +23,7 @@ permissions: contents: read env: - AUTO_PUSH_IMAGES: ${{ vars.AUTO_PUSH_IMAGES }} + AUTO_PUSH_IMAGES: ${{ contains(fromJSON('["workflow_dispatch", "push"]'), github.event_name) && 'false' || vars.AUTO_PUSH_IMAGES }} LATEST_BRANCH: ${{ github.event.repository.default_branch }} TRUNK_GIT_BRANCH: "refs/heads/trunk" From 37bc5841ac1ba80b3c4a8401dc659e99d3a882d6 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Wed, 14 Feb 2024 17:30:41 +0900 Subject: [PATCH 2/3] Prepare RHEL workflow for secrets --- .github/workflows/images_build_rhel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/images_build_rhel.yml b/.github/workflows/images_build_rhel.yml index 105f17759..92aef3fbf 100644 --- a/.github/workflows/images_build_rhel.yml +++ b/.github/workflows/images_build_rhel.yml @@ -353,7 +353,7 @@ jobs: if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} with: username: ${{ format('redhat-isv-containers+{0}-robot', secrets[format('{0}_{1}_PROJECT', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)]) }} - password: ${{ secrets[format('{0}_{1}_SECRET', needs.init_build.outputs.secret_prefix, matrix.build)] }} + password: ${{ secrets[format('{0}_{1}_SECRET', needs.init_build.outputs.secret_prefix, steps.var_format.outputs.matrix_build)] }} registry: ${{ env.REGISTRY }} auth_file_path: /tmp/.docker_${{ matrix.build }}_${{ matrix.arch }}_${{ needs.init_build.outputs.sha_short }} From dc93826ef92f2ed1307a8e7792167bb21c7c912f Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Wed, 14 Feb 2024 17:35:10 +0900 Subject: [PATCH 3/3] Prepare RHEL workflow for secrets --- .github/workflows/images_build_rhel.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/images_build_rhel.yml b/.github/workflows/images_build_rhel.yml index 92aef3fbf..3e72733c7 100644 --- a/.github/workflows/images_build_rhel.yml +++ b/.github/workflows/images_build_rhel.yml @@ -14,6 +14,12 @@ on: - '!**/README.md' - '.github/workflows/images_build_rhel.yml' workflow_dispatch: + inputs: + publish_images: + description: 'Publish images' + required: true + default: false + type: boolean defaults: run: @@ -23,7 +29,7 @@ permissions: contents: read env: - AUTO_PUSH_IMAGES: ${{ contains(fromJSON('["workflow_dispatch", "push"]'), github.event_name) && 'false' || vars.AUTO_PUSH_IMAGES }} + AUTO_PUSH_IMAGES: ${{ github.event.inputs.publish_images }} LATEST_BRANCH: ${{ github.event.repository.default_branch }} TRUNK_GIT_BRANCH: "refs/heads/trunk"