Skip to content

Commit 033000f

Browse files
Merge branch 'main' into allow-reverts
2 parents 3937e78 + 27a44fb commit 033000f

10 files changed

Lines changed: 140 additions & 118 deletions

.gitallowed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ password: \${{ secrets\.GITHUB_TOKEN }}
55
def __init__\(self, token: str, owner: str, repo: str.*
66
self\.token = token
77
token = os\.environ\.get\(\"GH_TOKEN\"\)
8+
\-Dsonar\.token=\"\$SONAR_TOKEN\"

.github/workflows/combine-dependabot-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-22.04
4646
steps:
4747
- name: Checkout repository
48-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
48+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
4949
with:
5050
repository: NHSDigital/eps-common-workflows
5151
sparse-checkout-cone-mode: false

.github/workflows/pull_request.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2727

2828
- name: Get asdf version
2929
id: asdf-version
@@ -47,6 +47,5 @@ jobs:
4747
dry_run: true
4848
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
4949
branch_name: ${{ github.event.pull_request.head.ref }}
50-
publish_package: false
5150
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
5251
secrets: inherit

.github/workflows/quality-checks.yml

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
quality_checks:
2929
runs-on: ubuntu-22.04
3030
steps:
31-
- uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e
31+
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
3232
if: ${{ inputs.install_java }}
3333
with:
3434
java-version: "21"
3535
distribution: "corretto"
3636

3737
- name: Checkout code
38-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
3939
with:
4040
ref: ${{ env.BRANCH_NAME }}
4141
fetch-depth: 0
@@ -328,7 +328,14 @@ jobs:
328328

329329
- name: Run SonarQube analysis
330330
if: ${{ steps.check_languages.outputs.uses_java == 'true' && env.SONAR_TOKEN_EXISTS == 'true' }}
331-
run: mvn sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
331+
run: |
332+
# issues with sonar scanner and sslcontext-kickstart 9.1.0, forcing re-download
333+
rm -rf ~/.m2/repository/io/github/hakky54/sslcontext-kickstart/9.1.0
334+
mvn dependency:get -U -Dartifact=io.github.hakky54:sslcontext-kickstart:9.1.0
335+
# run sonar scan
336+
mvn sonar:sonar -Dsonar.token="$SONAR_TOKEN"
337+
env:
338+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
332339

333340
- name: SonarCloud Scan
334341
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9
@@ -342,11 +349,41 @@ jobs:
342349
runs-on: ubuntu-22.04
343350
steps:
344351
- name: Checkout code
345-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
352+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
346353
with:
347354
ref: ${{ env.BRANCH_NAME }}
348355
fetch-depth: 0
349356

357+
# using git commit sha for version of action to ensure we have stable version
358+
- name: Install asdf
359+
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
360+
with:
361+
asdf_version: ${{ inputs.asdfVersion }}
362+
363+
- name: Cache asdf
364+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
365+
with:
366+
path: |
367+
~/.asdf
368+
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ inputs.asdfVersion }}
369+
restore-keys: |
370+
${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ inputs.asdfVersion }}
371+
372+
- name: Install asdf dependencies in .tool-versions
373+
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
374+
with:
375+
asdf_version: ${{ inputs.asdfVersion }}
376+
env:
377+
PYTHON_CONFIGURE_OPTS: --enable-shared
378+
379+
- name: Reinstall poetry
380+
if: ${{ inputs.reinstall_poetry }}
381+
run: |
382+
poetry_tool_version=$(cat .tool-versions | grep poetry)
383+
poetry_version=${poetry_tool_version//"poetry "}
384+
asdf uninstall poetry "$poetry_version"
385+
asdf install poetry
386+
350387
- name: Check for SAM templates
351388
id: check_sam_templates
352389
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1919

2020
- name: Get asdf version
2121
id: asdf-version
@@ -39,6 +39,5 @@ jobs:
3939
dry_run: false
4040
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
4141
branch_name: main
42-
publish_package: false
4342
tag_format: ${{ needs.get_asdf_version.outputs.tag_format }}
4443
secrets: inherit

.github/workflows/tag-release.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ on:
1515
type: string
1616
required: false
1717
default: "0.18.0"
18-
publish_package:
19-
description: "Whether to publish a package to an npm registry"
20-
required: true
21-
type: boolean
18+
publish_packages:
19+
description: "comma separated list of package folders to publish to an npm registry"
20+
required: false
21+
type: string
22+
default: ""
2223
tag_format:
2324
description: "The tag format to use for the release tags"
2425
required: false
@@ -67,7 +68,7 @@ jobs:
6768
runs-on: ubuntu-22.04
6869
steps:
6970
- name: Checkout semantic-release workflow
70-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
71+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
7172
with:
7273
repository: NHSDigital/eps-common-workflows
7374
sparse-checkout-cone-mode: false
@@ -210,7 +211,7 @@ jobs:
210211
# echo "NODE_PATH=$NODE_PATH" >> $GITHUB_ENV
211212
212213
- name: Clone calling repo
213-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
214+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
214215
with:
215216
repository: ${{ github.repository }}
216217
ref: ${{ github.sha }}
@@ -230,7 +231,7 @@ jobs:
230231
name: config_artifact
231232

232233
- name: Cache asdf
233-
if: ${{ inputs.publish_package }}
234+
if: inputs.publish_packages != ''
234235
uses: actions/cache@v5
235236
with:
236237
path: |
@@ -240,15 +241,15 @@ jobs:
240241
${{ runner.os }}-asdf-
241242
242243
- name: Install asdf dependencies in .tool-versions
243-
if: ${{ inputs.publish_package }}
244+
if: inputs.publish_packages != ''
244245
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
245246
with:
246247
asdf_version: ${{ inputs.asdfVersion }}
247248
env:
248249
PYTHON_CONFIGURE_OPTS: --enable-shared
249250

250251
- name: Install Dependencies and Build Package
251-
if: ${{ inputs.publish_package }}
252+
if: inputs.publish_packages != ''
252253
run: |
253254
make install
254255
make build
@@ -314,7 +315,7 @@ jobs:
314315
env:
315316
GITHUB_TOKEN: ${{ github.token }}
316317
BRANCH_NAME: ${{ inputs.branch_name }}
317-
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
318+
PUBLISH_PACKAGES: ${{ inputs.publish_packages }}
318319
TAG_FORMAT: ${{ inputs.tag_format }}
319320
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
320321
MAIN_BRANCH: ${{ inputs.main_branch }}
@@ -325,7 +326,7 @@ jobs:
325326
env:
326327
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
327328
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
328-
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
329+
PUBLISH_PACKAGES: ${{ inputs.publish_packages }}
329330
TAG_FORMAT: ${{ inputs.tag_format }}
330331
MAIN_BRANCH: ${{ inputs.main_branch }}
331332
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}

0 commit comments

Comments
 (0)