Skip to content

Commit

Permalink
Add permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisDyallo committed May 6, 2024
1 parent 9473ac0 commit 28b9c8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
pull_request:
branches:
- main
- 'develop**'
- 'develop/**'
- 'release/**'
paths:
- '**.h'
Expand All @@ -32,12 +32,15 @@ on:

jobs:
test:
permissions:
pull-requests: write
checks: write
name: Run tests
uses: ./.github/workflows/test.yml

build:
name: Build
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,20 @@ on:
type: string

permissions:
contents: read
id-token: write
packages: write

jobs:
test:
permissions:
pull-requests: write
checks: write
name: Run tests
uses: ./.github/workflows/test.yml

build:
name: Build, save artefacts
runs-on: windows-2019

steps:
# Checkout the local repository
- uses: actions/checkout@v4
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
checks: write
needs: coverage
if: github.event_name == 'pull_request'
Expand All @@ -111,7 +110,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
checks: write
needs: [test-windows, test-ubuntu, test-macOS]
if: github.event_name == 'pull_request'
Expand Down

0 comments on commit 28b9c8f

Please sign in to comment.