Skip to content

Commit 43aacf3

Browse files
committed
ci: add workflow for testing action
1 parent f665d68 commit 43aacf3

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test gha-trivy Action
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Create dummy file to scan
17+
run: |
18+
echo 'FROM alpine' > Dockerfile
19+
echo 'RUN apk add --no-cache curl' >> Dockerfile
20+
21+
- name: Build test image
22+
run: |
23+
docker build -t test-gha-trivy:latest .
24+
25+
- name: Run gha-trivy action
26+
uses: ./
27+
with:
28+
image-ref: test-gha-trivy:latest
29+
create-test-report: 'true'
30+
create-summary: 'true'

.wetf-repo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ presets:
66
- github-actions
77
- renovate-config
88
- workflows-default
9+
10+
required_checks:
11+
- check

0 commit comments

Comments
 (0)