fix: set check level correctly during workflow (#5344)
Fixes a workflow bug where the `check-level` was not always set correctly. Arguments to a `gh` call used to determine the `check_level` were accidentally outside of the relevant command substitution (`$(gh ...)`). ----- This can be observed in [these logs](https://github.com/leanprover/lean4/actions/runs/10859763037/job/30139540920), where the check level (shown first under "configure build matrix") is `2`, but the PR does not have the `release-ci` tag. As a "test", run the script for "set check level" printed in those logs (with some lines omitted): ``` check_level=0 labels="$(gh api repos/leanprover/lean4/pulls/5343) --jq '.labels'" if echo "$labels" | grep -q "release-ci"; then check_level=2 elif echo "$labels" | grep -q "merge-ci"; then check_level=1 fi echo "check_level=$check_level" ``` Note that this prints `check_level=2`, but changing `labels` to `labels="$(gh api repos/leanprover/lean4/pulls/5343 --jq '.labels')"` prints `check_level=0`.
This commit is contained in:
parent
60bb451d45
commit
5eea8355ba
1 changed files with 1 additions and 1 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -114,7 +114,7 @@ jobs:
|
|||
elif [[ "${{ github.event_name }}" != "pull_request" ]]; then
|
||||
check_level=1
|
||||
else
|
||||
labels="$(gh api repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/${{ github.event.pull_request.number }}) --jq '.labels'"
|
||||
labels="$(gh api repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/pulls/${{ github.event.pull_request.number }} --jq '.labels')"
|
||||
if echo "$labels" | grep -q "release-ci"; then
|
||||
check_level=2
|
||||
elif echo "$labels" | grep -q "merge-ci"; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue