Skip to content

Commit 779961a

Browse files
committed
ci(clamav): use local setup-bun action per repo docs; split PATH application to next step
1 parent 14b2d58 commit 779961a

2 files changed

Lines changed: 15 additions & 22 deletions

File tree

.github/workflows/clam-av-pr.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,16 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
- name: Setup Bun
19-
run: |
20-
curl -fsSL https://bun.sh/install | bash
21-
echo '$HOME/.bun/bin' >> $GITHUB_PATH
22-
bun --version
19+
uses: ./.github/actions/setup-bun
20+
21+
- name: Verify Bun
22+
run: bun --version
2323

2424
- name: Install dependencies (Bun)
25-
run: |
26-
bun install --frozen-lockfile || bun install
25+
run: bun install --frozen-lockfile || bun install
2726

2827
- name: Build (Bun)
29-
run: |
30-
bun run build
28+
run: bun run build
3129

3230
- name: Package build outputs
3331
run: |

.github/workflows/clam-av-scan.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
clamav-release:
2121
runs-on: ubuntu-latest
2222
steps:
23-
# Checkout the right ref
2423
- name: Checkout (release tag)
2524
if: github.event_name == 'release'
2625
uses: actions/checkout@v4
@@ -30,20 +29,18 @@ jobs:
3029
if: github.event_name != 'release'
3130
uses: actions/checkout@v4
3231

33-
# Build with Bun (single source of truth)
3432
- name: Setup Bun
35-
run: |
36-
curl -fsSL https://bun.sh/install | bash
37-
echo "$HOME/.bun/bin" >> $GITHUB_PATH
38-
bun --version
33+
uses: ./.github/actions/setup-bun
34+
35+
- name: Verify Bun
36+
run: bun --version
37+
3938
- name: Install dependencies (Bun)
40-
run: |
41-
bun install --frozen-lockfile || bun install
39+
run: bun install --frozen-lockfile || bun install
40+
4241
- name: Build (Bun)
43-
run: |
44-
bun run build
42+
run: bun run build
4543

46-
# Package build outputs (and, as fallback, repo without VCS)
4744
- name: Package build outputs
4845
run: |
4946
set -e
@@ -57,7 +54,6 @@ jobs:
5754
tar -czf dist-pr/scan.tgz -C dist-pr/payload .
5855
ls -lh dist-pr/scan.tgz
5956
60-
# Install ClamAV signatures
6157
- name: Install & update ClamAV DB
6258
run: |
6359
set -e
@@ -69,13 +65,12 @@ jobs:
6965
sudo freshclam --verbose
7066
ls -lh /var/lib/clamav
7167
72-
# Extract and scan so file counts reflect real contents
7368
- name: ClamAV scan (extract and scan all files)
7469
run: |
7570
set -e
7671
mkdir -p dist-pr/extracted
7772
tar -xzf dist-pr/scan.tgz -C dist-pr/extracted
78-
echo "File count in payload: $(find dist-pr/extracted -type f | wc -l)"
73+
echo 'File count in payload: '$(find dist-pr/extracted -type f | wc -l)
7974
clamscan -ri --scan-archive=yes dist-pr/extracted | tee clamav.log
8075
! grep -q 'Infected files: [1-9]' clamav.log
8176

0 commit comments

Comments
 (0)