Skip to content

Commit e72b03f

Browse files
authored
chore: update docker image demo workflow, update to Node 24 (#402)
1 parent 4dbc2ff commit e72b03f

7 files changed

Lines changed: 24 additions & 18 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "weekly"
12-
exclude-paths:
13-
- "e2e/fixtures/**"
12+
ignore:
13+
- dependency-name: "*"
14+
paths:
15+
- "e2e/fixtures/**"

.github/workflows/demo-build-and-scan-docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Node.js
2020
uses: actions/setup-node@v6
2121
with:
22-
node-version: '22'
22+
node-version-file: '.nvmrc'
2323

2424
- name: Install cdxgen
2525
run: npm install -g @cyclonedx/cdxgen
@@ -48,7 +48,7 @@ jobs:
4848
- name: Set up Node.js
4949
uses: actions/setup-node@v6
5050
with:
51-
node-version: '22'
51+
node-version-file: '.nvmrc'
5252

5353
- name: Download SBOM artifact
5454
uses: actions/download-artifact@v6

.github/workflows/demo-scan-docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Node.js
2020
uses: actions/setup-node@v6
2121
with:
22-
node-version: '22'
22+
node-version-file: '.nvmrc'
2323

2424
- name: Install cdxgen
2525
run: npm install -g @cyclonedx/cdxgen
@@ -44,7 +44,7 @@ jobs:
4444
- name: Set up Node.js
4545
uses: actions/setup-node@v6
4646
with:
47-
node-version: '22'
47+
node-version-file: '.nvmrc'
4848

4949
- name: Download SBOM artifact
5050
uses: actions/download-artifact@v6

.github/workflows/demo-scan-with-image.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@ jobs:
1414
- name: Checkout repository
1515
uses: actions/checkout@v5
1616

17-
- name: Make workspace writable
18-
run: chmod -R 777 $GITHUB_WORKSPACE
19-
2017
- name: Run EOL Scan
2118
run: |
22-
docker run --rm \
19+
docker run --name eol-scanner \
2320
-v $GITHUB_WORKSPACE:/app \
2421
-w /app \
25-
ghcr.io/herodevs/eol-scan --save
22+
ghcr.io/herodevs/eol-scan --save --output /tmp/herodevs.report.json
23+
docker cp eol-scanner:/tmp/herodevs.report.json ${{ runner.temp }}/herodevs.report.json
24+
docker rm eol-scanner
2625
2726
- name: Upload artifact
2827
uses: actions/upload-artifact@v5
2928
with:
3029
name: my-eol-report
31-
path: ./herodevs.report.json
30+
path: ${{ runner.temp }}/herodevs.report.json

.github/workflows/demo-scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- uses: actions/setup-node@v6
1818
with:
19-
node-version: '22'
19+
node-version-file: '.nvmrc'
2020

2121
- name: Run EOL Scan
2222
run: npx @herodevs/cli@beta scan eol --save

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22
1+
v24

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ You can use `@herodevs/cli` in your CI/CD pipelines to automate EOL scanning.
209209
We provide a Docker image that's pre-configured to run EOL scans. Based on [`cdxgen`](https://github.com/CycloneDX/cdxgen),
210210
it contains build tools for most project types and will provide best results when generating an SBOM. Use these templates to generate a report and save it to your CI job artifact for analysis and processing after your scan runs.
211211

212+
**Note:** There is a potential to run into permission issues writing out the report to your CI runner. Please ensure that your CI runner is setup to have proper read/write permissions for wherever your output files are being written to.
213+
212214
#### GitHub Actions
213215

214216
```yaml
@@ -231,16 +233,18 @@ jobs:
231233

232234
- name: Run EOL Scan
233235
run: |
234-
docker run --rm \
236+
docker run --name eol-scanner \
235237
-v $GITHUB_WORKSPACE:/app \
236238
-w /app \
237-
ghcr.io/herodevs/eol-scan --save
239+
ghcr.io/herodevs/eol-scan --save --output /tmp/herodevs.report.json
240+
docker cp eol-scanner:/tmp/herodevs.report.json ${{ runner.temp }}/herodevs.report.json
241+
docker rm eol-scanner
238242
239243
- name: Upload artifact
240244
uses: actions/upload-artifact@v5
241245
with:
242246
name: my-eol-report
243-
path: ./herodevs.report.json
247+
path: ${{ runner.temp }}/herodevs.report.json
244248
```
245249
246250
#### GitLab CI/CD
@@ -284,9 +288,10 @@ jobs:
284288
runs-on: ubuntu-latest
285289
steps:
286290
- uses: actions/checkout@v5
291+
287292
- uses: actions/setup-node@v6
288293
with:
289-
node-version: '22'
294+
node-version: '24'
290295
291296
- run: echo # Prepare environment, install tooling, perform setup, etc.
292297

0 commit comments

Comments
 (0)