Skip to content

Commit e6ea1db

Browse files
committed
Incrementally testing GH action.
1 parent 0bb47b7 commit e6ea1db

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/duplicate-prod-db.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
DEST_SQL_SERVICE_ACCOUNT=$(gcloud sql instances describe $DB_INSTANCE_NAME --format="value(serviceAccountEmailAddress)")
6666
echo "Destination SQL Service Account: $DEST_SQL_SERVICE_ACCOUNT"
6767
68-
# Give read permission on the bucket to the destination sql instance
68+
# Give read-write permission on the bucket to the destination sql instance
6969
gsutil iam ch serviceAccount:$DEST_SQL_SERVICE_ACCOUNT:objectAdmin gs://$DUMP_BUCKET_NAME
7070
7171
# Dump the QA database as a backup
@@ -74,10 +74,14 @@ jobs:
7474
# in a way that avoids locking the database and works from GCP itself (so no traffic leaves GCP).
7575
gcloud sql export sql $DB_INSTANCE_NAME gs://$DUMP_BUCKET_NAME/qa-db-dump-backup.sql --database=$DATABASE_NAME --quiet
7676
77-
# - name: Authenticate to Google Cloud PROD project Again
78-
# uses: google-github-actions/auth@v2
79-
# with:
80-
# credentials_json: ${{ secrets.PROD_GCP_MOBILITY_FEEDS_SA_KEY }}
81-
#
82-
# - name: GCloud Setup PROD 1
83-
# uses: google-github-actions/setup-gcloud@v2
77+
- name: Authenticate to Google Cloud PROD project Again
78+
uses: google-github-actions/auth@v2
79+
with:
80+
credentials_json: ${{ secrets.PROD_GCP_MOBILITY_FEEDS_SA_KEY }}
81+
82+
- name: GCloud Setup PROD 2
83+
uses: google-github-actions/setup-gcloud@v2
84+
85+
- name: Dump the PROD DB
86+
run: |
87+
gcloud sql export sql $DB_INSTANCE_NAME gs://$DUMP_BUCKET_NAME/$DUMP_FILE_NAME --database=$DATABASE_NAME --quiet

0 commit comments

Comments
 (0)