fix pyspark logic #20
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: Upload PySpark Scripts to GCS | |
on: | |
push: | |
# Branch protection is configured in the Github repo to prevent | |
# direct push to the main branch | |
paths: | |
- 'pyspark-scripts/**' | |
workflow_dispatch: | |
jobs: | |
upload-to-gcs: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Configure Workload Identity Federation | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
# Replace with values based on setup.sh in dev-infrastructure repo | |
workload_identity_provider: 'projects/734911192367/locations/global/workloadIdentityPools/deb-pool/providers/github-actions' | |
service_account: '[email protected]' | |
# Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`. | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: Upload scripts to GCS | |
run: | | |
gsutil rsync -r pyspark-scripts gs://deb-capstone/pyspark-scripts |