Skip to content

Commit

Permalink
Add required permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsheepuk committed Dec 15, 2023
1 parent b879de5 commit 0cbe182
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
push:
branches: [main]

permissions:
contents: read # Required for actions/checkout
checks: write # Set status of checks
issues: write # Comment the PR as we go
statuses: write # Set commit statuses as tests pass or fail
pull-requests: write # Get/comment the PR itself
packages: write # Write to ghcr.io

jobs:
build:
runs-on: ubuntu-latest
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ name: build-publish
on:
pull_request:

permissions:
contents: read # Required for actions/checkout
checks: write # Set status of checks
issues: write # Comment the PR as we go
statuses: write # Set commit statuses as tests pass or fail
pull-requests: write # Get/comment the PR itself
packages: write # Write to ghcr.io

jobs:
build:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.meta.outputs.tags }}
steps:
- name: Login to docker registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -30,7 +38,6 @@ jobs:
timeout-minutes: 3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit 0cbe182

Please sign in to comment.