Skip to content

Commit

Permalink
pass GITHUB_TOKEN to action ; set permissions before calling action
Browse files Browse the repository at this point in the history
  • Loading branch information
drink7036290 committed Dec 23, 2024
1 parent 26f4bdc commit 7796620
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/basics/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ runs:
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
with:
github_token: ${{ secrets.github_token }}
github_token: ${{ inputs.github_token }}
reporter: github-pr-review
fail_on_error: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,12 @@ jobs:
# Basic actions that must pass before we kick off more expensive tests.
basics:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/basics
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
rust_nightly: ${{ env.rust_nightly }}
4 changes: 4 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ env:
jobs:
basics:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/basics
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
rust_nightly: ${{ env.rust_nightly }}

0 comments on commit 7796620

Please sign in to comment.