Skip to content

Commit

Permalink
ci: restrict job permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
scottames committed Apr 19, 2024
1 parent ac044f5 commit 23b361d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pr_chezmoi_init.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: chezmoi init
on:
push:
Expand All @@ -6,10 +7,13 @@ on:
pull_request:
branches:
- main
permissions: read-all
jobs:
getModules:
name: chezmoi init
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr_semantic.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
---
name: Check Semantic Pull Request

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions: read-all
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release_please.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
permissions: read-all
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: google-github-actions/release-please-action@v4
with:
Expand Down

0 comments on commit 23b361d

Please sign in to comment.