Skip to content

Commit ae3d6b3

Browse files
New: [AEA-6028] - Updated actionlint to allow for yaml anchors (#63)
## Summary - ✨ New Feature
1 parent 5ccebbf commit ae3d6b3

File tree

2 files changed

+23
-68
lines changed

2 files changed

+23
-68
lines changed

.github/workflows/quality-checks.yml

Lines changed: 22 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
java-version: "21"
4545
distribution: "corretto"
4646

47-
- name: Checkout code
47+
- &checkout
48+
name: Checkout code
4849
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
4950
with:
5051
ref: ${{ env.BRANCH_NAME }}
@@ -83,49 +84,50 @@ jobs:
8384
git-secrets --scan-history .
8485
8586
# using git commit sha for version of action to ensure we have stable version
86-
- name: Install asdf
87+
- &install_asdf
88+
name: Install asdf
8789
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
8890
with:
8991
asdf_version: ${{ inputs.asdfVersion }}
9092

91-
- name: Cache asdf
93+
- &cache_asdf
94+
name: Cache asdf
9295
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
9396
with:
94-
path: |
95-
~/.asdf
97+
path: ~/.asdf
9698
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ inputs.asdfVersion }}
97-
restore-keys: |
98-
${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ inputs.asdfVersion }}
9999

100-
- name: Install asdf dependencies in .tool-versions
100+
- &install_asdf_deps
101+
name: Install asdf dependencies in .tool-versions
101102
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
102103
with:
103104
asdf_version: ${{ inputs.asdfVersion }}
104105
env:
105106
PYTHON_CONFIGURE_OPTS: --enable-shared
106107

107-
- name: Reinstall poetry
108+
- &reinstall_poetry
109+
name: Reinstall poetry
108110
if: ${{ inputs.reinstall_poetry }}
109111
run: |
110112
poetry_tool_version=$(cat .tool-versions | grep poetry)
111113
poetry_version=${poetry_tool_version//"poetry "}
112114
asdf uninstall poetry "$poetry_version"
113115
asdf install poetry
114116
115-
- name: Setting up .npmrc
117+
- &setup_npmrc
118+
name: Setting up .npmrc
116119
env:
117120
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118121
run: |
119122
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
120123
echo "@nhsdigital:registry=https://npm.pkg.github.com" >> ~/.npmrc
121124
122-
- name: Cache npm dependencies
125+
- &cache_npm
126+
name: Cache npm dependencies
123127
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
124128
with:
125129
path: ./node_modules
126130
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
127-
restore-keys: |
128-
${{ runner.os }}-node-
129131

130132
- name: make install
131133
run: |
@@ -233,9 +235,6 @@ jobs:
233235
- name: Run code lint
234236
run: make lint
235237

236-
- name: actionlint
237-
uses: raven-actions/actionlint@e01d1ea33dd6a5ed517d95b4c0c357560ac6f518
238-
239238
- name: Run ShellCheck
240239
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
241240
with:
@@ -510,41 +509,11 @@ jobs:
510509
IaC-validation:
511510
runs-on: ubuntu-22.04
512511
steps:
513-
- name: Checkout code
514-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
515-
with:
516-
ref: ${{ env.BRANCH_NAME }}
517-
fetch-depth: 0
518-
519-
# using git commit sha for version of action to ensure we have stable version
520-
- name: Install asdf
521-
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
522-
with:
523-
asdf_version: ${{ inputs.asdfVersion }}
524-
525-
- name: Cache asdf
526-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
527-
with:
528-
path: |
529-
~/.asdf
530-
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ inputs.asdfVersion }}
531-
restore-keys: |
532-
${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ inputs.asdfVersion }}
533-
534-
- name: Install asdf dependencies in .tool-versions
535-
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
536-
with:
537-
asdf_version: ${{ inputs.asdfVersion }}
538-
env:
539-
PYTHON_CONFIGURE_OPTS: --enable-shared
540-
541-
- name: Reinstall poetry
542-
if: ${{ inputs.reinstall_poetry }}
543-
run: |
544-
poetry_tool_version=$(cat .tool-versions | grep poetry)
545-
poetry_version=${poetry_tool_version//"poetry "}
546-
asdf uninstall poetry "$poetry_version"
547-
asdf install poetry
512+
- *checkout
513+
- *install_asdf
514+
- *cache_asdf
515+
- *install_asdf_deps
516+
- *reinstall_poetry
548517

549518
- name: Check for SAM templates
550519
id: check_sam_templates
@@ -598,22 +567,8 @@ jobs:
598567
cfn-lint -I "cloudformation/**/*.y*ml" 2>&1 | awk '/Run scan/ { print } /^[EW][0-9]/ { print; getline; print }'
599568
cfn-lint -I "SAMtemplates/**/*.y*ml" 2>&1 | awk '/Run scan/ { print } /^[EW][0-9]/ { print; getline; print }'
600569
601-
- name: Cache npm dependencies
602-
if: steps.check_cdk.outputs.cdk_exists == 'true'
603-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
604-
with:
605-
path: ~/.npm
606-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
607-
restore-keys: |
608-
${{ runner.os }}-node-
609-
610-
- name: Setting up .npmrc
611-
if: steps.check_cdk.outputs.cdk_exists == 'true'
612-
env:
613-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
614-
run: |
615-
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
616-
echo "@nhsdigital:registry=https://npm.pkg.github.com" >> ~/.npmrc
570+
- *cache_npm
571+
- *setup_npmrc
617572

618573
- name: make install NodeJS
619574
if: steps.check_cdk.outputs.cdk_exists == 'true'

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
nodejs 24.12.0
2-
actionlint 1.7.8
2+
actionlint 1.7.10
33
shellcheck 0.11.0
44
python 3.14.2
55
poetry 2.2.1

0 commit comments

Comments
 (0)