1- # .github/workflows/terraform-dev
21name : " Z-BASE Deploy UI: Run a deploy job for the UI"
32
3+ run-name : " ${{ github.event.inputs.build_branch }} | ${{ github.event.inputs.environment }} | ${{ github.event.inputs.sandbox }}"
4+
45on :
56 workflow_call :
67 inputs :
2122 required : true
2223
2324permissions :
24- actions : read # Required for anchore/sbom-action
25+ actions : read # Required for anchore/sbom-action
2526 contents : write # Required for anchore/sbom-action
2627 id-token : write # This is required for requesting the JWT
2728 pull-requests : write
3738 steps :
3839 - uses : actions/checkout@v6
3940 with :
40- repository : ' NHSDigital/national-document-repository'
41+ repository : " NHSDigital/national-document-repository"
4142 ref : ${{ inputs.build_branch }}
42- fetch-depth : ' 0 '
43+ fetch-depth : " 0 "
4344
4445 - name : Configure AWS Credentials
4546 uses : aws-actions/configure-aws-credentials@v5
@@ -48,10 +49,10 @@ jobs:
4849 role-skip-session-tagging : true
4950 aws-region : ${{ vars.AWS_REGION }}
5051 mask-aws-account-id : true
51-
52+
5253 - name : Get SSM parameters
5354 id : ssm-parameters
54- run : |
55+ run : |
5556 doc_store_api_endpoint=$(aws ssm get-parameter --name "/ndr/${{ inputs.sandbox }}/api_endpoint" --with-decryption --query "Parameter.Value" --output text)
5657 echo "::add-mask::$doc_store_api_endpoint"
5758 echo "ENDPOINT_DOC_STORE_API=$doc_store_api_endpoint" >> $GITHUB_ENV
6566 cloudfront_domain_name=$(aws cloudfront list-distributions --query "DistributionList.Items[?starts_with(Origins.Items[0].DomainName, '${{ inputs.sandbox }}')].DomainName" --output text)
6667 echo "Cloudfront domain name found for environment: $cloudfront_domain_name"
6768 echo "CLOUDFRONT_DOMAIN_NAME=$cloudfront_domain_name" >> $GITHUB_ENV
68-
69+
6970 - name : Login to Amazon ECR
7071 id : login-ecr
7172 uses : aws-actions/amazon-ecr-login@v2
@@ -86,16 +87,16 @@ jobs:
8687 --query "AppMonitorSummaries[?starts_with(Name, '${{ inputs.sandbox }}')].Id" \
8788 --output text)
8889 echo "::add-mask::$app_monitor_id"
89- echo "MONITOR_ACCOUNT_ID=$app_monitor_id" >> $GITHUB_OUTPUT
90+ echo "MONITOR_ACCOUNT_ID=$app_monitor_id" >> $GITHUB_OUTPUT
9091
9192 - name : Configure React environment vars
9293 env :
9394 AWS_REGION : ${{ vars.AWS_REGION }}
9495 OIDC_PROVIDER_ID : not provided yet
95- IDENTITY_PROVIDER_POOL_ID : ${{ steps.cognito-identity-pool.outputs.IDENTITY_PROVIDER_POOL_ID }}
96- MONITOR_ACCOUNT_ID : ${{ steps.rum-app-monitor.outputs.MONITOR_ACCOUNT_ID }}
96+ IDENTITY_PROVIDER_POOL_ID : ${{ steps.cognito-identity-pool.outputs.IDENTITY_PROVIDER_POOL_ID }}
97+ MONITOR_ACCOUNT_ID : ${{ steps.rum-app-monitor.outputs.MONITOR_ACCOUNT_ID }}
9798 BUILD_ENV : ${{ inputs.environment }}
98- IMAGE_VERSION : ' ndr-${{ inputs.sandbox }}-app:${{ github.sha }}'
99+ IMAGE_VERSION : " ndr-${{ inputs.sandbox }}-app:${{ github.sha }}"
99100 run : |
100101 ./react-environment-config.sh
101102
0 commit comments