Skip to content

Commit

Permalink
Setting an output parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
davseve committed Aug 7, 2023
1 parent 8e7d6ca commit bbe5748
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/one-click-hosting-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,31 +42,22 @@ 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
uses: ./.github/workflows/bump-channel-version
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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/set-postfix-value/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bbe5748

Please sign in to comment.