@@ -90,11 +90,12 @@ jobs:
9090 python_version : " ${{ needs.metadata.outputs.python_version }}"
9191 terraform_version : " ${{ needs.metadata.outputs.terraform_version }}"
9292 version : " ${{ needs.metadata.outputs.version }}"
93- secrets : inherit
9493 test-stage : # Recommended maximum execution time is 5 minutes
9594 name : " Test stage"
9695 needs : [metadata, commit-stage]
9796 uses : ./.github/workflows/stage-2-test.yaml
97+ secrets :
98+ github_token : ${{ secrets.GITHUB_TOKEN }}
9899 with :
99100 unit_test_dir : tests/UnitTests
100101 app_dir : application/CohortManager
@@ -105,11 +106,12 @@ jobs:
105106 python_version : " ${{ needs.metadata.outputs.python_version }}"
106107 terraform_version : " ${{ needs.metadata.outputs.terraform_version }}"
107108 version : " ${{ needs.metadata.outputs.version }}"
108- secrets : inherit
109109 analysis-stage : # Recommended maximum execution time is 5 minutes
110110 name : " Analysis stage"
111111 needs : [metadata, commit-stage, test-stage]
112112 uses : ./.github/workflows/stage-2-analyse.yaml
113+ secrets :
114+ sonar_token : ${{ secrets.SONAR_TOKEN }}
113115 with :
114116 unit_test_dir : tests/UnitTests
115117 build_datetime : " ${{ needs.metadata.outputs.build_datetime }}"
@@ -119,11 +121,16 @@ jobs:
119121 python_version : " ${{ needs.metadata.outputs.python_version }}"
120122 terraform_version : " ${{ needs.metadata.outputs.terraform_version }}"
121123 version : " ${{ needs.metadata.outputs.version }}"
122- secrets : inherit
123124 build-image-stage : # Recommended maximum execution time is 3 minutes
124125 name : " Image build stage"
125126 needs : [metadata, commit-stage, test-stage, analysis-stage]
126127 uses : ./.github/workflows/stage-3-build-images.yaml
128+ secrets :
129+ github_token : ${{ secrets.GITHUB_TOKEN }}
130+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
131+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
132+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
133+ acr-name : ${{ secrets.ACR_NAME }}
127134 if : needs.metadata.outputs.does_pull_request_exist == 'true' || github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
128135 with :
129136 docker_compose_file : application/CohortManager/compose.yaml
@@ -132,7 +139,6 @@ jobs:
132139 function_app_source_code_path : application/CohortManager/src
133140 project_name : cohort-manager
134141 build_all_images : true
135- secrets : inherit
136142 acceptance-stage : # Recommended maximum execution time is 10 minutes
137143 name : " Acceptance stage"
138144 needs : [metadata, build-image-stage]
@@ -146,7 +152,6 @@ jobs:
146152 python_version : " ${{ needs.metadata.outputs.python_version }}"
147153 terraform_version : " ${{ needs.metadata.outputs.terraform_version }}"
148154 version : " ${{ needs.metadata.outputs.version }}"
149- secrets : inherit
150155 deploy-stage :
151156 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
152157 name : Deploy environments for commit ${{ github.sha }}
@@ -155,10 +160,13 @@ jobs:
155160 id-token : write
156161 contents : read
157162 uses : ./.github/workflows/stage-4-deploy.yaml
163+ secrets :
164+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
165+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
166+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
158167 with :
159168 environments : " [\" development\" ,\" nft\" ,\" integration\" ]"
160169 commit_sha : ${{ github.sha }}
161- secrets : inherit
162170 validate-title-stage :
163171 name : Validate PR title
164172 runs-on : ubuntu-latest
0 commit comments