Skip to content

Commit

Permalink
Fix permissions on Github Actions jobs
Browse files Browse the repository at this point in the history
Related: #7425
  • Loading branch information
jonathanmetzman committed Mar 23, 2022
1 parent ec4b0ea commit cc54f69
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/infra_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Infra tests

permissions:
contents: read

on:
pull_request:
paths:
Expand All @@ -8,7 +12,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest

permissions:
actions: write
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.8.0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Presubmit checks

permissions:
contents: read

on:
pull_request:
branches:
Expand All @@ -8,7 +11,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest

permissions:
actions: write
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.8.0
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/project_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Project tests

permissions:
contents: read

on:
pull_request:
branches:
Expand All @@ -8,6 +11,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: write
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit cc54f69

Please sign in to comment.