Merge pull request #34 from lactf/burturt-patch-2 #96
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: Build using Cloud Build | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
env: | |
PROJECT_ID: la-ctf | |
jobs: | |
setup-build-deploy: | |
name: Setup, Build, and Deploy | |
runs-on: ubuntu-latest | |
# Add "id-token" with the intended permissions. | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Configure Workload Identity Federation and generate an access token. | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
workload_identity_provider: 'projects/227102684565/locations/global/workloadIdentityPools/github-pool/providers/github' | |
service_account: 'github-ci@la-ctf.iam.gserviceaccount.com' | |
# Setup gcloud CLI | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
# Build and push image to Google Container Registry | |
- name: Build | |
run: gcloud builds submit --region=us-west2 |