From bbe57486610289b1c0e25b866fbaaf82d4a3bba5 Mon Sep 17 00:00:00 2001 From: David Seveloff Date: Mon, 7 Aug 2023 13:26:05 +0300 Subject: [PATCH] Setting an output parameter --- .github/workflows/one-click-hosting-release.yml | 17 +++++------------ .github/workflows/set-postfix-value/action.yml | 10 +++++----- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/one-click-hosting-release.yml b/.github/workflows/one-click-hosting-release.yml index 35fce91b91b..4cf2842f24f 100644 --- a/.github/workflows/one-click-hosting-release.yml +++ b/.github/workflows/one-click-hosting-release.yml @@ -17,6 +17,8 @@ env: jobs: release: runs-on: ubuntu-22.04 + outputs: + POSTFIX: ${{ steps.set_postfix_value.outputs.POSTFIX }} steps: - name: checkout branch uses: actions/checkout@v3 @@ -40,23 +42,15 @@ jobs: node-version: 18.x - name: Set POSTFIX value id: set_postfix_value - shell: bash - run: | - # Set the postfix value - POSTFIX="" - - if [[ '${{ github.event.inputs.pre_release }}' == 'true' ]]; then - POSTFIX="-test" - fi - - echo "POSTFIX=${POSTFIX}" >> $GITHUB_OUTPUT + uses: ./.github/workflows/set-postfix-value + with: + PRE_RELEASE: ${{ github.event.inputs.pre_release }} - name: Env Vars Configure id: env_vars_configure uses: ./.github/workflows/env-vars-configure with: CHANNEL: ${{ env.CHANNEL }} REF: ${{ github.ref }} - # POSTFIX: ${{ env.POSTFIX }} POSTFIX: ${{ steps.set_postfix_value.outputs.POSTFIX }} - name: Bump Channel Version id: bump_channel_version @@ -64,7 +58,6 @@ jobs: with: CLEAN_PACKAGE_VERSION: ${{ env.CLEAN_PACKAGE_VERSION }} CHANNEL: ${{ env.CHANNEL }} - # POSTFIX: ${{ env.POSTFIX }} POSTFIX: ${{ steps.set_postfix_value.outputs.POSTFIX }} - name: Install Dependencies run: npm ci diff --git a/.github/workflows/set-postfix-value/action.yml b/.github/workflows/set-postfix-value/action.yml index c380e7a35c7..7d98991b405 100644 --- a/.github/workflows/set-postfix-value/action.yml +++ b/.github/workflows/set-postfix-value/action.yml @@ -17,11 +17,11 @@ runs: shell: bash run: | # Set the postfix value - if [[ ${{ inputs.CHANNEL }} == 'cloud' && ${{ inputs.PRERELEASE }} == 'true' ]]; then + + POSTFIX="" + if [[ ${{ inputs.PRERELEASE }} == 'true' ]]; then POSTFIX="-test" - else - POSTFIX="" fi - echo "set-output name=POSTFIX::${POSTFIX}" - #echo "POSTFIX=${POSTFIX}" >> $GITHUB_OUTPUT + #echo "set-output name=POSTFIX::${POSTFIX}" + echo "POSTFIX=${POSTFIX}" >> $GITHUB_OUTPUT