From ba3cbf501f1b00180ec90a9a679e31a7c21f0fc3 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 24 Jul 2021 07:41:36 +0530 Subject: Trying to fix issue with CHANGES_COUNT not being deduced properly on CI runs (thus skipping the ferdi version). [skip ci] --- .github/workflows/dependency-updates.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index 8daa52a6d..cb40dc27c 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml @@ -26,8 +26,10 @@ jobs: uses: actions/checkout@v2 with: submodules: recursive - - name: Extract Git branch name from the currently checked out branch (not from the branch where this run was kicked off) - run: echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV + - name: Extract Git branch name and commit from the currently checked out branch (not from the branch where this run was kicked off) + run: | + echo "GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV + echo "GIT_COMMIT=$(git log -1 --format='%H')" >> $GITHUB_ENV shell: bash - name: Cache node modules uses: actions/cache@v2 @@ -62,7 +64,7 @@ jobs: git config user.name github-actions git config user.email github-actions@github.com git commit -am "Update submodules, browserslist data updates and linter fixes [skip ci]" --no-verify || true - echo "CHANGES_COUNT=$(git diff --shortstat origin/${{ env.GIT_BRANCH_NAME }} | wc -l)" >> $GITHUB_ENV + echo "CHANGES_COUNT=$(git diff ${{ env.GIT_COMMIT }} | wc -l)" >> $GITHUB_ENV - name: Bump version number if this is a scheduled build with changes or has been manually triggered with 'version bump' in the text, then bump the version number if: ${{ (github.event_name == 'schedule' && env.CHANGES_COUNT != '0') || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, 'version bump')) }} run: npm version prerelease --preid=nightly -- cgit v1.2.3-70-g09d2