Skip to content

Commit 3273a71

Browse files
authored
Corrected a bug with DRY_RUN when the catalog is updated. (#1450)
1 parent 15745bd commit 3273a71

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/catalog-update.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
DB_NAME: ${{ vars.QA_POSTGRE_SQL_DB_NAME }}
4343
ENVIRONMENT: ${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }}
4444
DB_ENVIRONMENT: ${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }}
45-
DRY_RUN: ${{ github.event_name == 'repository_dispatch' || inputs.DRY_RUN }}
45+
# With repository_dispatch, DRY_RUN is always false.
46+
# With workflow_dispatch we take the specified values of DRY_RUN.
47+
DRY_RUN: ${{ (github.event_name != 'repository_dispatch' && inputs.DRY_RUN) }}
4648
CHECKOUT_REF: ${{ needs.resolve-api-meta-qa.outputs.CHECKOUT_REF }}
4749
secrets:
4850
DB_USER_PASSWORD: ${{ secrets.QA_POSTGRE_USER_PASSWORD }}
@@ -79,7 +81,9 @@ jobs:
7981
DB_NAME: ${{ vars.PROD_POSTGRE_SQL_DB_NAME }}
8082
ENVIRONMENT: ${{ vars.PROD_MOBILITY_FEEDS_ENVIRONMENT }}
8183
DB_ENVIRONMENT: ${{ vars.PROD_MOBILITY_FEEDS_ENVIRONMENT }}
82-
DRY_RUN: ${{ github.event_name == 'repository_dispatch' || inputs.DRY_RUN }}
84+
# With repository_dispatch, DRY_RUN is always false.
85+
# With workflow_dispatch we take the specified values of DRY_RUN.
86+
DRY_RUN: ${{ (github.event_name != 'repository_dispatch' && inputs.DRY_RUN) }}
8387
CHECKOUT_REF: ${{ needs.resolve-api-meta-prod.outputs.CHECKOUT_REF }}
8488
secrets:
8589
DB_USER_PASSWORD: ${{ secrets.PROD_POSTGRE_USER_PASSWORD }}
@@ -117,7 +121,9 @@ jobs:
117121
ENVIRONMENT: ${{ vars.DEV_MOBILITY_FEEDS_ENVIRONMENT }}
118122
# dev uses the QA sql instance
119123
DB_ENVIRONMENT: ${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }}
120-
DRY_RUN: ${{ github.event_name == 'repository_dispatch' || inputs.DRY_RUN }}
124+
# With repository_dispatch, DRY_RUN is always false.
125+
# With workflow_dispatch we take the specified values of DRY_RUN.
126+
DRY_RUN: ${{ (github.event_name != 'repository_dispatch' && inputs.DRY_RUN) }}
121127
CHECKOUT_REF: ${{ needs.resolve-api-meta-dev.outputs.CHECKOUT_REF }}
122128
secrets:
123129
DB_USER_PASSWORD: ${{ secrets.DEV_POSTGRE_USER_PASSWORD }}

0 commit comments

Comments
 (0)