1616 description : Toggle to run sonar code analyis on this repository.
1717 default : true
1818 required : false
19+ asdfVersion :
20+ type : string
21+ required : true
1922 reinstall_poetry :
2023 type : boolean
2124 description : Toggle to reinstall poetry on top of python version installed by asdf.
3134 - uses : actions/setup-java@v5
3235 if : ${{ inputs.install_java }}
3336 with :
34- java-version : ' 21 '
35- distribution : ' corretto'
37+ java-version : " 21 "
38+ distribution : " corretto"
3639
3740 - name : Checkout code
3841 uses : actions/checkout@v5
99102 run : |
100103 poetry_tool_version=$(cat .tool-versions | grep poetry)
101104 poetry_version=${poetry_tool_version//"poetry "}
102- asdf uninstall poetry $poetry_version
105+ asdf uninstall poetry " $poetry_version"
103106 asdf install poetry
104107
105108 - name : Setting up .npmrc
@@ -116,16 +119,16 @@ jobs:
116119 - name : Check if project uses Poetry
117120 id : check_poetry
118121 run : |
119- if [ -f pyproject.toml ] && grep -q '\[tool.poetry\]' pyproject.toml; then
122+ if [ -f " pyproject.toml" ] && grep -q '\[tool.poetry\]' " pyproject.toml" ; then
120123 echo "****************"
121124 echo "Project uses poetry"
122125 echo "****************"
123- echo "uses_poetry=true" >> $GITHUB_OUTPUT
126+ echo "uses_poetry=true" >> " $GITHUB_OUTPUT"
124127 else
125128 echo "****************"
126129 echo "Project does not use poetry"
127130 echo "****************"
128- echo "uses_poetry=false" >> $GITHUB_OUTPUT
131+ echo "uses_poetry=false" >> " $GITHUB_OUTPUT"
129132 fi
130133
131134 - name : Check if project uses Java
@@ -135,27 +138,27 @@ jobs:
135138 echo "****************"
136139 echo "Detected a Java project"
137140 echo "****************"
138- echo "uses_java=true" >> $GITHUB_OUTPUT
141+ echo "uses_java=true" >> " $GITHUB_OUTPUT"
139142 else
140143 echo "****************"
141144 echo "Project does not use Java"
142145 echo "****************"
143- echo "uses_java=false" >> $GITHUB_OUTPUT
146+ echo "uses_java=false" >> " $GITHUB_OUTPUT"
144147 fi
145-
148+
146149 - name : Check for SAM templates
147150 id : check_sam_templates
148151 run : |
149152 if [ -d "SAMtemplates" ]; then
150153 echo "****************"
151154 echo "Project has SAM templates"
152155 echo "****************"
153- echo "sam_exists=true" >> $GITHUB_OUTPUT
156+ echo "sam_exists=true" >> " $GITHUB_OUTPUT"
154157 else
155158 echo "****************"
156159 echo "Project does not have SAM templates"
157160 echo "****************"
158- echo "sam_exists=false" >> $GITHUB_OUTPUT
161+ echo "sam_exists=false" >> " $GITHUB_OUTPUT"
159162 fi
160163
161164 - name : Check for cloudformation templates
@@ -165,27 +168,27 @@ jobs:
165168 echo "****************"
166169 echo "Project has cloudformation templates"
167170 echo "****************"
168- echo "cf_exists=true" >> $GITHUB_OUTPUT
171+ echo "cf_exists=true" >> " $GITHUB_OUTPUT"
169172 else
170173 echo "****************"
171174 echo "Project does not have cloudformation templates"
172175 echo "****************"
173- echo "cf_exists=false" >> $GITHUB_OUTPUT
176+ echo "cf_exists=false" >> " $GITHUB_OUTPUT"
174177 fi
175-
178+
176179 - name : Check for cdk
177180 id : check_cdk
178181 run : |
179182 if [ -d "packages/cdk" ]; then
180183 echo "****************"
181184 echo "Project has cdk"
182185 echo "****************"
183- echo "cdk_exists=true" >> $GITHUB_OUTPUT
186+ echo "cdk_exists=true" >> " $GITHUB_OUTPUT"
184187 else
185188 echo "****************"
186189 echo "Project does not have cdk"
187190 echo "****************"
188- echo "cdk_exists=false" >> $GITHUB_OUTPUT
191+ echo "cdk_exists=false" >> " $GITHUB_OUTPUT"
189192 fi
190193
191194 - name : Check licenses (Makefile)
@@ -206,7 +209,7 @@ jobs:
206209
207210 # known packages with dual licensing
208211 IGNORE_PACKAGES="PyGithub chardet text-unidecode"
209- LICENSES=$(poetry run pip-licenses --ignore-packages ${IGNORE_PACKAGES})
212+ LICENSES=$(poetry run pip-licenses --ignore-packages " ${IGNORE_PACKAGES}" )
210213 INCOMPATIBLE_LIBS=$(echo "$LICENSES" | grep 'GPL' || true)
211214
212215 if [[ -z $INCOMPATIBLE_LIBS ]]; then
@@ -217,7 +220,7 @@ jobs:
217220 echo "$INCOMPATIBLE_LIBS"
218221 exit 1
219222 fi
220-
223+
221224 - name : Run code lint
222225 run : make lint
223226
@@ -242,12 +245,12 @@ jobs:
242245
243246 - name : Run unit tests
244247 run : make test
245-
248+
246249 - name : Run cdk-synth
247250 if : steps.check_cdk.outputs.cdk_exists == 'true'
248251 run : |
249252 make cdk-synth
250-
253+
251254 - name : Install AWS SAM CLI
252255 if : steps.check_sam_templates.outputs.sam_exists == 'true'
253256 run : |
@@ -342,8 +345,8 @@ jobs:
342345 uses : NHSDigital/eps-action-sbom@main
343346
344347 - name : " check is SONAR_TOKEN exists"
345- env :
346- super_secret : ${{ secrets.SONAR_TOKEN }}
348+ env :
349+ super_secret : ${{ secrets.SONAR_TOKEN }}
347350 if : ${{ env.super_secret != '' && inputs.run_sonar == true }}
348351 run : echo "SONAR_TOKEN_EXISTS=true" >> "$GITHUB_ENV"
349352
0 commit comments