-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add id-token permission to upload workflow (#334)
- Loading branch information
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: read | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
release: | ||
|
@@ -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 | ||
|
@@ -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 |