catalog-sources-updated #280
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
# Update the Mobility Database Schema | |
name: Database Update - DEV | |
on: | |
push: # Update on merge on master if the changelog file or populate script have been updated | |
branches: | |
- main | |
paths: | |
- 'liquibase/changelog.xml' | |
- 'api/src/scripts/populate_db*' | |
repository_dispatch: # Update on mobility-database-catalog repo dispatch | |
types: [ catalog-sources-updated ] | |
workflow_dispatch: | |
jobs: | |
update: | |
uses: ./.github/workflows/db-update.yml | |
with: | |
PROJECT_ID: ${{ vars.DEV_MOBILITY_FEEDS_PROJECT_ID }} | |
REGION: ${{ vars.MOBILITY_FEEDS_REGION }} | |
DB_NAME: ${{ vars.DEV_POSTGRE_SQL_DB_NAME }} | |
ENVIRONMENT: ${{ vars.DEV_MOBILITY_FEEDS_ENVIRONMENT }} | |
DB_ENVIRONMENT: ${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }} | |
secrets: | |
DB_USER_PASSWORD: ${{ secrets.DEV_POSTGRE_USER_PASSWORD }} | |
DB_USER_NAME: ${{ secrets.DEV_POSTGRE_USER_NAME }} | |
DB_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }} | |
GCP_MOBILITY_FEEDS_SA_KEY: ${{ secrets.DEV_GCP_MOBILITY_FEEDS_SA_KEY }} | |
DB_GCP_MOBILITY_FEEDS_SA_KEY: ${{ secrets.QA_GCP_MOBILITY_FEEDS_SA_KEY }} | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
OP_FEEDS_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_FEEDS_SERVICE_ACCOUNT_TOKEN }} | |
POSTGRE_SQL_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }} | |
notify-slack-on-failure: | |
needs: [ update ] | |
if: always() && (needs.update.result == 'failure') && (github.event_name == 'repository_dispatch') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Notify Slack | |
uses: ./.github/actions/notify-slack | |
with: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
PRIORITY: "high" |