Skip to content

chore: Set permissions for GitHub actions #10816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/contrib.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,13 @@ on:
branches:
- master

permissions:
contents: read

jobs:
deploy:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@ defaults:
run:
shell: bash

permissions:
contents: read

jobs:
# Check Code style quickly by running `rustfmt` over all code
rustfmt:
@@ -149,13 +152,17 @@ jobs:
sh linkcheck.sh --all cargo

success:
permissions:
contents: none
name: bors build finished
needs: [docs, rustfmt, test, resolver, build_std]
runs-on: ubuntu-latest
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps:
- run: echo ok
failure:
permissions:
contents: none
name: bors build finished
needs: [docs, rustfmt, test, resolver, build_std]
runs-on: ubuntu-latest