From d5b816684bfcb678ed82466a6b16c16622a131c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Dziedziul?= Date: Tue, 29 Aug 2023 15:04:52 +0200 Subject: [PATCH] Add manual trigger for rebuilding NLC images [5.2.z] (#658) --- .github/workflows/ee-nlc-tag-push.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ee-nlc-tag-push.yml b/.github/workflows/ee-nlc-tag-push.yml index 780e5318..43e4fb3a 100644 --- a/.github/workflows/ee-nlc-tag-push.yml +++ b/.github/workflows/ee-nlc-tag-push.yml @@ -6,6 +6,11 @@ on: - "!*" tags: - "v5.*" + workflow_dispatch: + inputs: + HZ_VERSION: + description: 'Version of Hazelcast to build the image for, e.g. 5.3.2, 5.1.1, 5.0.1' + required: true env: test_container_name_ee: hazelcast-ee-test @@ -19,16 +24,23 @@ jobs: NLC_REPO_TOKEN: ${{ secrets.NLC_REPO_TOKEN }} NLC_IMAGE_NAME: ${{ secrets.NLC_IMAGE_NAME }} S3_NLC_URL: ${{ secrets.S3_NLC_URL }} + HZ_VERSION: ${{ github.event.inputs.HZ_VERSION }} steps: - name: Checkout Code uses: actions/checkout@v3 - - name: Set Release Version - run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV + - name: Set HZ version + run: | + if [ -z "${{ env.HZ_VERSION }}" ]; then + HZ_VERSION=${GITHUB_REF:11} + else + HZ_VERSION=${{ env.HZ_VERSION }} + fi + echo "HZ_VERSION=${HZ_VERSION}" >> $GITHUB_ENV - name: Set NLC zip URL run: | - S3_NLC_ZIP_URL=${S3_NLC_URL}/hazelcast-enterprise-${RELEASE_VERSION}-nlc.zip + S3_NLC_ZIP_URL=${S3_NLC_URL}/hazelcast-enterprise-${HZ_VERSION}-nlc.zip echo "S3_NLC_ZIP_URL=${S3_NLC_ZIP_URL}" >> $GITHUB_ENV @@ -58,7 +70,7 @@ jobs: - name: Build EE image run: | docker buildx build --load \ - --build-arg HZ_VERSION=${RELEASE_VERSION} \ + --build-arg HZ_VERSION=${HZ_VERSION} \ --build-arg HAZELCAST_ZIP_URL=${HAZELCAST_ZIP_URL} \ --tag hazelcast-nlc:test hazelcast-enterprise @@ -86,7 +98,7 @@ jobs: - name: Build/Push EE image run: | docker buildx build --push \ - --build-arg HZ_VERSION=${RELEASE_VERSION} \ + --build-arg HZ_VERSION=${HZ_VERSION} \ --build-arg HAZELCAST_ZIP_URL=${HAZELCAST_ZIP_URL} \ - --tag ${NLC_IMAGE_NAME}:${RELEASE_VERSION} \ + --tag ${NLC_IMAGE_NAME}:${HZ_VERSION} \ --platform=linux/arm64,linux/amd64 hazelcast-enterprise