Skip to content

Commit

Permalink
Fallback to GITHUB_RUN_NUMBER if RELEASEACTION_PREVRELEASE is unset
Browse files Browse the repository at this point in the history
This is so there is still a build number when built on other repositories
  • Loading branch information
Kas-tle authored Apr 21, 2024
1 parent 810c9ce commit e955616
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
- 'gh-readonly-queue/**'
paths-ignore:
- '.github/ISSUE_TEMPLATE/*.yml'
- '.github/actions/workflows/build-remote.yml'
- '.github/actions/workflows/preview.yml'
- '.github/actions/workflows/pull-request.yml'
- '.github/workflows/build-remote.yml'
- '.github/workflows/preview.yml'
- '.github/workflows/pull-request.yml'
- '.idea/copyright/*.xml'
- '.gitignore'
- 'CONTRIBUTING.md'
Expand All @@ -29,7 +29,7 @@ jobs:
BUILD_JSON: ${{ vars.RELEASEACTION_PREVRELEASE }}
run: |
BUILD_NUMBER=$(echo $BUILD_JSON | jq --arg branch "${GITHUB_REF_NAME}" 'if .[$branch] == null then 1 else .[$branch] | .t | tonumber + 1 end // 1')
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> $GITHUB_ENV
echo "BUILD_NUMBER=${BUILD_NUMBER:=$GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- name: Checkout repository and submodules
# See https://github.com/actions/checkout/commits
Expand Down

0 comments on commit e955616

Please sign in to comment.