File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 42
42
43
43
# Exit with error if open and S-waiting-on-bors
44
44
if [[ "$STATE" == "OPEN" && "$WAITING_ON_BORS" == "true" ]]; then
45
- exit 1
45
+ gh run cancel ${{ github.run_id }}
46
46
fi
47
47
48
48
update :
65
65
66
66
- name : cargo update
67
67
# Remove first line that always just says "Updating crates.io index"
68
- run : cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
68
+ # If there are no changes, cancel the job here
69
+ run : |
70
+ cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
71
+ git status --porcelain | grep -q Cargo.lock || gh run cancel ${{ github.run_id }}
69
72
- name : upload Cargo.lock artifact for use in PR
70
73
uses : actions/upload-artifact@v3
71
74
with :
@@ -131,7 +134,7 @@ jobs:
131
134
# Exit with error if PR is closed
132
135
STATE=$(gh pr view cargo_update --repo $GITHUB_REPOSITORY --json state --jq '.state')
133
136
if [[ "$STATE" != "OPEN" ]]; then
134
- exit 1
137
+ gh run cancel ${{ github.run_id }}
135
138
fi
136
139
137
140
gh pr edit cargo_update --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY
You can’t perform that action at this time.
0 commit comments