Skip to content

Commit

Permalink
fixes workflow permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderniebuhr committed May 1, 2024
1 parent 73a2443 commit 91124a6
Showing 1 changed file with 41 additions and 3 deletions.
44 changes: 41 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@ on:
- opened
- synchronize
- reopened

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
checks: read
contents: read
deployments: write
issues: write
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
outputs:
skip: ${{ steps.moon-build.outputs.skip }}
steps:
Expand Down Expand Up @@ -84,8 +96,21 @@ jobs:
deploy-preview:
needs: build
if: ${{ github.ref != 'refs/heads/main' && needs.build.outputs.skip != 'true' }}
name: Deploy / Preview
name: Deploy - Preview
runs-on: ubuntu-latest
permissions:
actions: read
checks: read
contents: read
deployments: write
issues: write
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
Expand Down Expand Up @@ -155,8 +180,21 @@ jobs:
deploy-production:
if: ${{ github.ref == 'refs/heads/main' && needs.build.outputs.skip != 'true' }}
needs: build
name: Deploy / Production
name: Deploy - Production
runs-on: ubuntu-latest
permissions:
actions: read
checks: read
contents: read
deployments: write
issues: write
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
Expand Down

0 comments on commit 91124a6

Please sign in to comment.