Skip to content

Commit

Permalink
Merge pull request #57 from crazy-max/gha-perms
Browse files Browse the repository at this point in the history
ci: set contents read as default workflow permissions
  • Loading branch information
crazy-max authored Feb 8, 2025
2 parents 9a51382 + ced9481 commit 131ee64
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

on:
push:
branches:
Expand All @@ -23,6 +27,11 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
# same as global permissions
contents: read
# required to push to GHCR
packages: write
steps:
-
name: Checkout
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

on:
push:
branches:
Expand All @@ -19,6 +23,11 @@ on:
jobs:
labeler:
runs-on: ubuntu-latest
permissions:
# same as global permissions
contents: read
# required to update labels
issues: write
steps:
-
name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

on:
push:
branches:
Expand Down

0 comments on commit 131ee64

Please sign in to comment.