|
6 | 6 | schedule:
|
7 | 7 | # Run weekly
|
8 | 8 | - cron: '0 0 * * Sun'
|
9 |
| - # Re-bump deps every 4 hours |
10 |
| - - cron: '0 */4 * * *' |
11 | 9 | workflow_dispatch:
|
12 | 10 | # Needed so we can run it manually
|
13 | 11 | permissions:
|
|
42 | 40 |
|
43 | 41 | # Exit with error if open and S-waiting-on-bors
|
44 | 42 | if [[ "$STATE" == "OPEN" && "$WAITING_ON_BORS" == "true" ]]; then
|
45 |
| - gh run cancel ${{ github.run_id }} |
| 43 | + exit 1 |
46 | 44 | fi
|
47 | 45 |
|
48 | 46 | update:
|
|
65 | 63 |
|
66 | 64 | - name: cargo update
|
67 | 65 | # Remove first line that always just says "Updating crates.io index"
|
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 }} |
| 66 | + run: cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log |
72 | 67 | - name: upload Cargo.lock artifact for use in PR
|
73 | 68 | uses: actions/upload-artifact@v4
|
74 | 69 | with:
|
@@ -134,14 +129,14 @@ jobs:
|
134 | 129 | # Exit with error if PR is closed
|
135 | 130 | STATE=$(gh pr view cargo_update --repo $GITHUB_REPOSITORY --json state --jq '.state')
|
136 | 131 | if [[ "$STATE" != "OPEN" ]]; then
|
137 |
| - gh run cancel ${{ github.run_id }} |
| 132 | + exit 1 |
138 | 133 | fi
|
139 | 134 |
|
140 | 135 | gh pr edit cargo_update --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY
|
141 | 136 |
|
142 | 137 | - name: open new pull request
|
143 |
| - # Only run if there wasn't an existing PR and if this is the weekly run |
144 |
| - if: steps.edit.outcome != 'success' && github.event.schedule == '0 0 * * Sun' |
| 138 | + # Only run if there wasn't an existing PR |
| 139 | + if: steps.edit.outcome != 'success' |
145 | 140 | env:
|
146 | 141 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
147 | 142 | run: gh pr create --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY
|
0 commit comments