Skip to content

Commit 1033079

Browse files
committed
make CI logic more resilient against CI failures on the 1st of a month
1 parent e7b3062 commit 1033079

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ jobs:
9191
env:
9292
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9393
run: |
94-
# If this is not the first of the month, stop here.
95-
if [[ $(date -u +%d) != "01" ]]; then
96-
echo "It's not the first of a month, so there will be no PR."
94+
# If the `rust-version` file already has the right month, stop here
95+
if grep -q "nightly-$(date -u +%Y-%m)" rust-version; then
96+
echo "`rust-version` is already reasonably up-to-date, so there will be no PR."
9797
exit 0
9898
fi
9999
# Create commit

0 commit comments

Comments
 (0)