Skip to content

Commit

Permalink
Merge branch 'devex-753/liquibase' of https://github.com/CDCgov/trust…
Browse files Browse the repository at this point in the history
…ed-intermediary into devex-753/liquibase
  • Loading branch information
jcrichlake committed Feb 8, 2024
2 parents a9bc4f6 + 61d8430 commit 6f6541d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/terraform-deploy_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,22 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Extract database hostname and password into GitHub Env
run: |
DATABASE_HOSTNAME=$(terraform output -raw database_hostname)
DATABASE_PASSWORD=$(az account get-access-token --resource-type oss-rdbms --query "[accessToken]" -o tsv)
echo "::add-mask::$DATABASE_HOSTNAME"
echo "::add-mask::$DATABASE_PASSWORD"
echo "DATABASE_HOSTNAME=$DATABASE_HOSTNAME" >> "$GITHUB_ENV"
echo "DATABASE_PASSWORD=$DATABASE_PASSWORD" >> "$GITHUB_ENV"
- name: Run Db migration
uses: liquibase-github-actions/[email protected]
with:
changelogFile: ./etor/databaseMigrations/root.yml
url: "jdbc:postgresql://$(terraform output -raw database_hostname):5432/postgres"
url: "jdbc:postgresql://${{ env.DATABASE_HOSTNAME }}:5432/postgres"
username: cdcti-github
password: $(az account get-access-token --resource-type oss-rdbms --query "[accessToken]" -o tsv)
password: ${{ env.DATABASE_PASSWORD }}
rollbackOnError: true

- id: export-terraform-output
Expand Down

0 comments on commit 6f6541d

Please sign in to comment.