Skip to content

Commit

Permalink
Add id-token permission to upload workflow (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkwarren authored Jan 26, 2023
1 parent a97cfbc commit f47c8c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
id-token: write
packages: read

jobs:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

permissions:
contents: read
id-token: write

jobs:
release:
Expand All @@ -26,11 +27,6 @@ jobs:
with:
path: downloads
key: plugin-downloads
- name: Download Plugins
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
go run ./cmd/download-plugins downloads
# uses https://cloud.google.com/iam/docs/workload-identity-federation to
# swap a GitHub OIDC token for GCP service account credentials, allowing
# this workflow to manage the buf-plugins bucket
Expand All @@ -41,5 +37,10 @@ jobs:
service_account: [email protected]
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@d51b5346f85640ec2aa2fa057354d2b82c2fcbce
- name: Download Plugins
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
go run ./cmd/download-plugins downloads
- name: Upload To Release Bucket
run: gsutil rsync -r downloads gs://buf-plugins

0 comments on commit f47c8c1

Please sign in to comment.