Skip to content

Commit

Permalink
Fix automatic toolchain update
Browse files Browse the repository at this point in the history
1. Adjust permissions that were made overly restrictive in 4b829ab,
resulting in an inability to create branches.
2. Ensure `gh` can actually access the repository information by setting
`GH_TOKEN`.
  • Loading branch information
tautschnig committed Sep 3, 2023
1 parent 4b829ab commit 7795079
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/toolchain-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ on:
workflow_dispatch: # Allow manual dispatching for a custom branch / tag.

permissions:
contents: read
checks: write
contents: write
issues: write
pull-requests: write

jobs:
create-toolchain-pr:
Expand All @@ -31,6 +33,7 @@ jobs:
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 7795079

Please sign in to comment.