Skip to content

Commit 6e060a0

Browse files
committed
ci(nightly): fix execute condition
1 parent 4e7b039 commit 6e060a0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/nightly.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,17 @@ jobs:
2525
echo "MAIN_SHA=$MAIN_SHA" >> $GITHUB_ENV
2626
echo "NIGHTLY_SHA=$NIGHTLY_SHA" >> $GITHUB_ENV
2727
28+
if [ "$MAIN_SHA" = "$NIGHTLY_SHA" ] ; then
29+
echo "DEPLOY=false" >> $GITHUB_OUTPUT
30+
echo "No changes to deploy"
31+
else
32+
echo "DEPLOY=true" >> $GITHUB_OUTPUT
33+
echo "Will deploy Nightly build"
34+
fi
35+
2836
- name: Get version
2937
id: version
30-
if: '${{ env.MAIN-SHA }} != ${{ env.NIGHTLY-SHA }}'
38+
if: 'steps.deploy-nightly.outputs.DEPLOY == "true"'
3139
run: |
3240
datetime=$(date +%Y%m%d%H)
3341
pkg_version=$(node -p "require('./package.json').version")
@@ -37,7 +45,7 @@ jobs:
3745
echo "VERSION=$version" >> $GITHUB_ENV
3846
3947
- name: Publish Nightly Release
40-
if: '${{ env.MAIN-SHA }} != ${{ env.NIGHTLY-SHA }}'
48+
if: 'steps.deploy-nightly.outputs.DEPLOY == "true"'
4149
run: |
4250
echo "Publishing nightly release ${{ env.VERSION }}"
4351
npm ci
@@ -47,7 +55,7 @@ jobs:
4755
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}
4856

4957
- name: Create Nightly tag
50-
if: '${{ env.MAIN-SHA }} != ${{ env.NIGHTLY-SHA }}'
58+
if: 'steps.deploy-nightly.outputs.DEPLOY == "true"'
5159
run: |
5260
# git config user.name github-actions
5361
# git config user.email 41898282+github-actions[bot]@users.noreply.github.com

0 commit comments

Comments
 (0)