Skip to content

Commit fa00f25

Browse files
Update action
1 parent f69c53c commit fa00f25

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/gcp-deploy.reusable.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
outputs:
2525
full_api_url: ${{ steps.deploy_infra.outputs.full_api_url }}
2626
simulation_api_url: ${{ steps.deploy_infra.outputs.simulation_api_url }}
27+
us_model_version: ${{ steps.deploy_infra.outputs.us_model_version }}
28+
uk_model_version: ${{ steps.deploy_infra.outputs.uk_model_version }}
2729
environment: ${{ inputs.environment }}
2830
env:
2931
TF_VAR_stage: ${{ inputs.environment }}
@@ -111,6 +113,10 @@ jobs:
111113
FULL_API_URL=$(cat terraform_output.json | jq -r '.full_api_url.value // empty')
112114
SIMULATION_API_URL=$(cat terraform_output.json | jq -r '.simulation_api_url.value // empty')
113115
116+
# Extract model versions from release_metadata
117+
US_MODEL_VERSION=$(cat terraform_output.json | jq -r '.release_metadata.value.models.us // empty')
118+
UK_MODEL_VERSION=$(cat terraform_output.json | jq -r '.release_metadata.value.models.uk // empty')
119+
114120
# If outputs are not available from terraform, construct them
115121
if [ -z "$FULL_API_URL" ]; then
116122
FULL_API_URL="https://full-api-${{ vars.REGION }}-uc.a.run.app"
@@ -119,8 +125,18 @@ jobs:
119125
SIMULATION_API_URL="https://api-simulation-${{ vars.REGION }}-uc.a.run.app"
120126
fi
121127
128+
# If model versions are not available from terraform, use the ones from package extraction
129+
if [ -z "$US_MODEL_VERSION" ]; then
130+
US_MODEL_VERSION="${{ steps.versions.outputs.us_version }}"
131+
fi
132+
if [ -z "$UK_MODEL_VERSION" ]; then
133+
UK_MODEL_VERSION="${{ steps.versions.outputs.uk_version }}"
134+
fi
135+
122136
echo "full_api_url=${FULL_API_URL}" >> "$GITHUB_OUTPUT"
123137
echo "simulation_api_url=${SIMULATION_API_URL}" >> "$GITHUB_OUTPUT"
138+
echo "us_model_version=${US_MODEL_VERSION}" >> "$GITHUB_OUTPUT"
139+
echo "uk_model_version=${UK_MODEL_VERSION}" >> "$GITHUB_OUTPUT"
124140
125141
integ_test:
126142
name: Run integration test
@@ -190,4 +206,4 @@ jobs:
190206
simulation_integ_test_access_token: ${{ steps.get-simulation-id-token.outputs.id_token }}
191207
simulation_integ_test_base_url: ${{ needs.deploy.outputs.simulation_api_url }}
192208
workflow_integ_test_project_id: ${{ vars.PROJECT_ID }}
193-
workflow_integ_test_us_model_version: ${{ needs.deploy.outputs.release_metadata.models.us }}
209+
workflow_integ_test_us_model_version: ${{ needs.deploy.outputs.us_model_version }}

0 commit comments

Comments
 (0)