Skip to content

Commit

Permalink
Toolchain upgrade workflow: fix de-duplicating issues
Browse files Browse the repository at this point in the history
It seems that just setting the `GH_TOKEN` variable wasn't sufficient for
`gh` to work properly. (We ended up with model-checking#2748 as a duplicate of model-checking#2742.)
Now following the advice posted in the workflow run.
  • Loading branch information
tautschnig committed Sep 8, 2023
1 parent 18ea9e9 commit a1cd02d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/toolchain-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ jobs:
os: ubuntu-22.04

- name: Update toolchain config
env:
GH_TOKEN: ${{ github.token }}
run: |
current_toolchain_date=$(grep ^channel rust-toolchain.toml | sed 's/.*nightly-\(.*\)"/\1/')
echo "current_toolchain_date=$current_toolchain_date" >> $GITHUB_ENV
current_toolchain_epoch=$(date --date $current_toolchain_date +%s)
next_toolchain_date=$(date --date "@$(($current_toolchain_epoch + 86400))" +%Y-%m-%d)
echo "next_toolchain_date=$next_toolchain_date" >> $GITHUB_ENV
GH_TOKEN=${{ github.token }}
if gh issue list -S \
"Toolchain upgrade to nightly-$next_toolchain_date failed" \
--json number,title | grep title ; then
Expand Down

0 comments on commit a1cd02d

Please sign in to comment.