Skip to content

Merge pull request #38 from uche-madu/dev #15

Merge pull request #38 from uche-madu/dev

Merge pull request #38 from uche-madu/dev #15

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