Skip to content

Commit 55dd7a9

Browse files
committed
fix: workflow permissions
1 parent c7005bd commit 55dd7a9

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ on:
88
workflow_dispatch:
99
inputs:
1010
environment:
11-
description: 'Environment (Production, Staging or Staging API)'
11+
description: 'Environment to deploy'
1212
required: true
1313
type: choice
1414
options:
1515
- Production
1616
- Staging
1717
- Staging API
18+
workflow_call:
19+
inputs:
20+
environment:
21+
description: 'Environment ("Production", "Staging" or "Staging API")'
22+
required: true
23+
type: string
1824

1925
jobs:
2026
setup:
@@ -63,7 +69,11 @@ jobs:
6369
# we will dispatch another copy of this workflow to deploy the Staging API env; we invoke the workflow
6470
# with an input, so `github.event.inputs.environment` won't be "" and the `if` condition above will be
6571
# false, thus there won't be a recursive loop
66-
uses: canonical/snapcraft.io/.github/workflows/deploy.yaml@main
72+
uses: ./.github/workflows/deploy.yaml
73+
permissions:
74+
contents: read
75+
deployments: write
76+
packages: write
6777
with:
6878
environment: Staging API
6979
secrets:

0 commit comments

Comments
 (0)