Skip to content

Commit 1012555

Browse files
committed
Corrected a syntax error in a workflow yml file.
1 parent f62dc88 commit 1012555

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/db-update.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,20 @@ on:
8181
default: false
8282
type: boolean
8383

84+
# Add workflow-level vars (these are available in job `if` expressions)
85+
vars:
86+
# True when this run was triggered by a repository_dispatch or a manual workflow_dispatch
87+
IS_DISPATCH: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}
88+
8489
env:
8590
python_version: '3.11'
8691
liquibase_version: '4.33.0'
87-
# True when this run was triggered by a repository_dispatch or a manual workflow_dispatch
88-
IS_DISPATCH: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}
8992

9093
jobs:
9194
resolve-api-meta:
9295
name: 'Resolve API commit/version'
9396
runs-on: ubuntu-latest
94-
if: ${{ env.IS_DISPATCH == 'true' && inputs.API_BASE_URL != '' && secrets.API_TEST_REFRESH_TOKEN != '' }}
97+
if: ${{ vars.IS_DISPATCH == 'true' && inputs.API_BASE_URL != '' && secrets.API_TEST_REFRESH_TOKEN != '' }}
9598
outputs:
9699
COMMIT_SHA: ${{ steps.resolve.outputs.COMMIT_SHA }}
97100
API_VERSION: ${{ steps.resolve.outputs.API_VERSION }}
@@ -183,7 +186,7 @@ jobs:
183186
permissions: write-all
184187
runs-on: ubuntu-latest
185188
needs: [resolve-api-meta, db-schema-update]
186-
if: ${{ always() && env.IS_DISPATCH == 'true' }}
189+
if: ${{ always() && vars.IS_DISPATCH == 'true' }}
187190
steps:
188191
- name: Checkout code at API commit
189192
if: ${{ needs.resolve-api-meta.result == 'success' && needs.resolve-api-meta.outputs.COMMIT_SHA != '' }}
@@ -299,7 +302,7 @@ jobs:
299302

300303
update-gcp-secret:
301304
name: Update GCP Secrets
302-
if: ${{ env.IS_DISPATCH == 'true' && !inputs.DRY_RUN }}
305+
if: ${{ vars.IS_DISPATCH == 'true' && !inputs.DRY_RUN }}
303306
runs-on: ubuntu-latest
304307
steps:
305308
- name: Authenticate to Google Cloud
@@ -337,4 +340,3 @@ jobs:
337340
echo "Secret $SECRET_NAME does not exist in project $PROJECT_ID, creating..."
338341
echo -n "$SECRET_VALUE" | gcloud secrets create $SECRET_NAME --data-file=- --replication-policy="automatic" --project=$PROJECT_ID
339342
fi
340-

0 commit comments

Comments
 (0)