Skip to content

Commit

Permalink
ci: Set run-level permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Nov 20, 2024
1 parent 3d0624c commit 07f7631
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
- main
pull_request:

permissions:
contents: read
checks: write
statuses: write
permissions: read-all

jobs:
compile:
permissions:
contents: read
checks: write
statuses: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -31,6 +32,10 @@ jobs:
run: mvn -e --batch-mode compile -T 1C

verify:
permissions:
contents: read
checks: write
statuses: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -56,6 +61,6 @@ jobs:
VONAGE_PRIVATE_KEY_PATH: src/test/resources/com/vonage/client/kt/application_key
run: mvn -e --batch-mode clean verify -T 1C
- name: Run Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@288befbd1044bd1756afb0bdae077549e0ddb31f
with:
token: ${{ secrets.CODECOV_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ on:
release:
types: [published]

permissions:
contents: read
packages: write
permissions: read-all

jobs:
publish:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
Expand Down

0 comments on commit 07f7631

Please sign in to comment.