Skip to content

Commit 1009f53

Browse files
authored
Merge pull request #1 from NHSDigital/aea-000-dev
Try making reusable workflow
2 parents 195aba7 + 29e723a commit 1009f53

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed
File renamed without changes.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
node_version:
1010
description: The version of node used in this project.
1111
required: true
12-
type: number
12+
type: string
1313

1414
jobs:
1515
quality_checks:
@@ -21,7 +21,7 @@ jobs:
2121
ref: ${{ env.BRANCH_NAME }}
2222
fetch-depth: 0
2323

24-
# Using a specific commit SHA for stability
24+
# using git commit sha for version of action to ensure we have stable version
2525
- name: Install asdf
2626
uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
2727
with:
@@ -50,11 +50,12 @@ jobs:
5050
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
5151
echo "@nhsdigital:registry=https://npm.pkg.github.com" >> ~/.npmrc
5252
53-
- name: Install dependencies
54-
run: make install
53+
- name: make install
54+
run: |
55+
make install
5556
5657
- name: Generate and check SBOMs
57-
uses: NHSDigital/eps-action-sbom@main
58+
uses: NHSDigital/eps-action-sbom@npm20_version
5859
with:
5960
node_version: {{ inputs.node_version }}
6061

@@ -80,7 +81,7 @@ jobs:
8081
if: failure()
8182
run: find cfn_guard_output -type f -print0 | xargs -0 cat
8283

83-
- name: Upload cfn-guard output
84+
- name: Upload cfn_guard_output
8485
if: failure()
8586
uses: actions/upload-artifact@v4
8687
with:

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# eps-workflow-quality-checks
22
A workflow to run the quality checks for EPS repositories
3+
4+
# Usage
5+
6+
## Inputs
7+
### `node_version`
8+
9+
One of `[18, 20, 22]`. SBOM generations requires knowing which version of nodeJS is being used.
10+
11+
12+
## Required Makefile targets
13+
14+
In order to run, these `make` commands must be present. They may be mocked, if they are not relevant to the project.
15+
16+
- `install`
17+
- `check-licenses`
18+
- `lint`
19+
- `test`
20+
- `cfn-guard`
21+
22+
## Environment variables
23+
24+
### `SONAR_TOKEN`
25+
26+
Required for the SonarCloud Scan step, which analyzes your code for quality and security issues using SonarCloud.

0 commit comments

Comments
 (0)