File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Docker lint
2+ on :
3+ pull_request :
4+ types : [opened, synchronize, reopened]
5+ push :
6+ branches : [ main ]
7+
8+ jobs :
9+ lint :
10+ name : Lint Dockerfiles
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : ' 3.x'
20+
21+ - name : Install yamllint
22+ run : pip install yamllint
23+
24+ - name : Find and run yamllint on compose files
25+ run : |
26+ set -euo pipefail
27+ files=$(git ls-files "**/docker-compose*.yml" "**/docker-compose*.yaml" || true)
28+ if [ -n "$files" ]; then
29+ echo "$files" | xargs yamllint || true
30+ else
31+ echo "No compose files found"
32+ fi
Original file line number Diff line number Diff line change 1+ name : Docker security scan
2+ on :
3+ pull_request :
4+ types : [opened, synchronize, reopened]
5+ push :
6+ branches : [ main ]
7+
8+ jobs :
9+ trivy-scan :
10+ name : Run Trivy filesystem scan
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Run Trivy Action
16+ uses : aquasecurity/trivy-action@0.32.0
17+ with :
18+ format : ' table'
19+ scan-type : ' fs'
20+ severity : ' HIGH,CRITICAL'
21+ exit-code : ' 1'
22+ ignore-unfixed : true
You can’t perform that action at this time.
0 commit comments