From 2ec29bb8c5e750de70e6fb27edfa81dc2f65b9d7 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 28 Jul 2021 08:29:39 +0530 Subject: Fixing incorrect syntax for GH action workflow. [skip ci] --- .github/workflows/ferdi-builds.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml index 5bc20ff23..a3faf4ca6 100644 --- a/.github/workflows/ferdi-builds.yml +++ b/.github/workflows/ferdi-builds.yml @@ -54,7 +54,9 @@ jobs: git config user.email github-actions@github.com CHANGES_COUNT=$(git diff --shortstat origin/develop | wc -l) - if [ $CHANGES_COUNT -gt 0 ] || [ {{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[version bump]') }} ]; then + MANUAL_REBUILD="${{ github.event_name == 'workflow_dispatch' }}" + VERSION_BUMP="${{ contains(github.event.inputs.message, '[version bump]') }}" + if [ $CHANGES_COUNT -gt 0 ] || [ $MANUAL_REBUILD == "true" && $VERSION_BUMP == "true" ]; then # Do the version bump in the 'develop' branch ONLY if there were other changes coming from the 'develop' branch git checkout develop npm version -m "%s [skip ci]" prerelease --preid=nightly @@ -66,7 +68,6 @@ jobs: echo "Merge with fast-forward from 'origin/develop'" git merge --ff-only origin/develop --no-verify - MANUAL_REBUILD="${{ github.event_name == 'workflow_dispatch' }}" echo "Number of changes: $CHANGES_COUNT" if [ $CHANGES_COUNT -eq 0 ] && [ $MANUAL_REBUILD != "true" ]; then echo "No changes found - terminating the build" -- cgit v1.2.3-54-g00ecf