Skip to content

s

s #8

name: Scratch Workflow
on:
push:
branches: [bkellam/release_cleanup]
workflow_dispatch:
jobs:
scratch:
runs-on: ubuntu-latest
environment: staging
permissions:
contents: 'read'
# Requird for OIDC auth with GCP.
# @see: https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
id-token: 'write'
steps:
# - name: 'Checkout'
# uses: 'actions/checkout@v3'
# with:
# submodules: "true"
- name: Print environment variable
env:
NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT: ${{ vars.NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT }}
run: echo $NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT
# @see: https://github.com/google-github-actions/auth?tab=readme-ov-file#direct-wif
- name: 'Google auth'
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
project_id: '${{ secrets.GCP_PROJECT_ID }}'
workload_identity_provider: '${{ secrets.GCP_WIF_PROVIDER }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
with:
project_id: '${{ secrets.GCP_PROJECT_ID }}'
- name: 'Docker auth'
run: |-
gcloud auth configure-docker us-west1-docker.pkg.dev