Test opengen bucket permissions #1
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
name: Test opengen bucket permissions | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: 'actions/checkout@v4' | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Authenticate with Google Cloud | |
uses: 'google-github-actions/[email protected]' | |
with: | |
project_id: 'opengen-437315' | |
workload_identity_provider: 'projects/557148610837/locations/global/workloadIdentityPools/gen-website-private-publishers/providers/github' | |
service_account: '[email protected]' | |
audience: '//iam.googleapis.com/projects/557148610837/locations/global/workloadIdentityPools/gen-website-private-publishers/providers/github' | |
- name: Deploy test file to Google Cloud Storage | |
run: | | |
echo "This is a test file" > test-file.txt | |
BUCKET_PATH="gs://opengen-websites/test-file.txt" | |
gcloud storage cp test-file.txt $BUCKET_PATH | |
echo "Test file deployed to $BUCKET_PATH" |