Skip to content

Commit

Permalink
fixup! fixup! fixup! Copy PostgresSQL to GCS as CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj committed Apr 17, 2024
1 parent 5eb413c commit 4641f93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/bi_transfer_pola_backend_to_gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 2
# Use Open ID Connect to authenticate to GCP
# For details, see:
# https://cloud.google.com/blog/products/identity-security/enabling-keyless-authentication-from-github-actions
- id: 'auth'
name: 'Authenticate to GCP'
uses: 'google-github-actions/auth@v0.3.1'
with:
# yamllint disable-line rule:line-length
workload_identity_provider: 'projects/354540873199/locations/global/workloadIdentityPools/github-action-pool/providers/github-action-provider'
service_account: 'pola-bi-github-action@pola-bi.iam.gserviceaccount.com'
export_environment_variables: true
create_credentials_file: true
- run: gcloud auth list --filter=status:ACTIVE --format="value(account)"
- name: "Setup Python"
uses: actions/setup-python@v5
with:
Expand All @@ -57,6 +63,7 @@ jobs:
printenv | grep POLA_APP | cut -d "=" -f 2- | xargs -n 1 -I {} echo "::add-mask::{}"
printenv | grep POLA_APP >> $GITHUB_ENV;
- run: ./pola-bi/postgres_to_gcs/postgres_to_csv.py --output-dir /tmp/csv-files/
- run: find /tmp/csv-files/
- run: gcloud storage ls --recursive 'gs://pola_app_pola_backend_postgres_export/**'
- run: gsutil rsync /tmp/csv-files/ 'gs://pola_app_pola_backend_postgres_export'
- run: gcloud storage ls --recursive 'gs://pola_app_pola_backend_postgres_export/**'

0 comments on commit 4641f93

Please sign in to comment.