fix(nc-gui): set output if env is shared between jobs

This commit is contained in:
Wing-Kam Wong
2022-10-25 18:32:01 +08:00
parent bcbd809cc7
commit b25e8a11fe
6 changed files with 51 additions and 37 deletions

View File

@@ -29,16 +29,21 @@ jobs:
echo "NIGHTLY_BUILD_TAG=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "IS_DAILY=${IS_DAILY}" >> $GITHUB_OUTPUT
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
# verify
echo NIGHTLY_BUILD_TAG: ${{ env.NIGHTLY_BUILD_TAG }}
echo IS_DAILY: ${{ env.IS_DAILY }}
echo CURRENT_VERSION: ${{ env.CURRENT_VERSION }}
- name: verify-tag
run: |
echo ${{ steps.tag-step.outputs.NIGHTLY_BUILD_TAG }}
echo ${{ steps.tag-step.outputs.IS_DAILY }}
echo ${{ steps.tag-step.outputs.CURRENT_VERSION }}
outputs:
nightly_build_tag: ${{ steps.tag-step.outputs.NIGHTLY_BUILD_TAG }}
is_daily: ${{ steps.tag-step.outputs.IS_DAILY }}
current_version: ${{ steps.tag-step.outputs.CURRENT_VERSION }}
# Build frontend and backend and publish to npm
release-npm:
needs: set-tag
uses: ./.github/workflows/release-npm.yml
with:
tag: ${{ env.NIGHTLY_BUILD_TAG }}
tag: ${{ needs.set-tag.outputs.nightly_build_tag }}
targetEnv: 'DEV'
secrets:
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
@@ -48,7 +53,7 @@ jobs:
needs: [set-tag, release-npm]
uses: ./.github/workflows/release-timely-executables.yml
with:
tag: ${{ env.CURRENT_VERSION }}-${{ env.NIGHTLY_BUILD_TAG }}
tag: ${{ needs.set-tag.outputs.current_version }}-${{ needs.set-tag.outputs.nightly_build_tag }}
secrets:
NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}"
@@ -57,10 +62,10 @@ jobs:
needs: [set-tag, release-npm]
uses: ./.github/workflows/release-docker.yml
with:
currentVersion: ${{ env.CURRENT_VERSION }}
tag: ${{ env.NIGHTLY_BUILD_TAG }}
currentVersion: ${{ needs.set-tag.outputs.current_version }}
tag: ${{ needs.set-tag.outputs.nightly_build_tag }}
targetEnv: 'DEV'
isDaily: ${{ env.IS_DAILY }}
isDaily: ${{ needs.set-tag.outputs.is_daily }}
secrets:
DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}"
DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}"