Skip to content

Commit fd65021

Browse files
committed
turn version-bump CI job into a check instead of auto-commit
1 parent 567d884 commit fd65021

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

‎.github/workflows/test-pr.yml‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,19 @@ jobs:
1515
- name: 'Check out code'
1616
uses: actions/checkout@v3
1717
with:
18-
token: ${{ secrets.JENKINS_GITHUB_PAT }}
1918
# fetch-depth 0 means deep clone the repo
2019
fetch-depth: 0
2120
ref: ${{ github.event.pull_request.head.sha }}
22-
- name: 'Configure GitHub user'
23-
run: |
24-
git config user.name devops
25-
git config user.email devops@runtimeverification.com
26-
- name: 'Update version'
21+
- name: 'Check version was bumped'
2722
run: |
2823
og_version=$(git show origin/${GITHUB_BASE_REF}:package/version)
2924
./package/version.sh bump ${og_version}
3025
./package/version.sh sub
31-
new_version=$(cat package/version)
32-
git add --update && git commit --message "Set Version: ${new_version}" || true
33-
- name: 'Push updates'
34-
run: git push origin HEAD:${GITHUB_HEAD_REF}
26+
if ! git diff --quiet; then
27+
echo "::error::Version was not bumped for this PR. Run './package/version.sh bump ${og_version} && ./package/version.sh sub' locally and commit the result."
28+
git diff
29+
exit 1
30+
fi
3531
3632
pykwasm-code-quality-checks:
3733
name: 'Code Quality Checks'

0 commit comments

Comments
 (0)