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+ # Exclude the Git version control folder
2+ .git
3+ .gitignore
4+ .github /
5+
6+ # General exclusions
7+ pytest.ini
8+ README.md
9+ TODO.md
10+ tests /
11+ compose.yml
12+
13+ # Nix develop
14+ flake.lock
15+ flake.nix
Original file line number Diff line number Diff line change 99 # Only allow running on the dev branch
1010 if : github.ref == 'refs/heads/dev'
1111
12+ permissions :
13+ contents : write # Needed to create tags and releases
14+ packages : write # Needed to push to GHCR
15+ id-token : write # For trusted publishing
16+
1217 steps :
1318 - name : Checkout dev branch
1419 uses : actions/checkout@v4
@@ -25,11 +30,15 @@ jobs:
2530 username : ${{ github.actor }}
2631 password : ${{ secrets.GITHUB_TOKEN }}
2732
33+ - name : Create lowercase repository name
34+ id : repo
35+ run : echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
36+
2837 - name : Build and push :dev image
2938 uses : docker/build-push-action@v6
3039 with :
3140 context : .
3241 push : true
33- tags : ghcr.io/${{ github.repository }}:dev
42+ tags : ghcr.io/${{ steps.repo.outputs.name }}:dev
3443 cache-from : type=gha
3544 cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1+ name : security scan
2+ on :
3+ push :
4+ branches :
5+ - main
6+ pull_request :
7+
8+ permissions :
9+ contents : read
10+ security-events : write
11+
12+ jobs :
13+ gosec_zizmor :
14+ name : security scan
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v6
18+ with :
19+ persist-credentials : false
20+ - uses : actions/setup-go@v6
21+ with :
22+ go-version : stable
23+ - name : Run Gosec Security Scanner
24+ uses : securego/gosec@6be2b51fd78feca86af91f5186b7964d76cb1256 # v2.22.10
25+ with :
26+ args : " -no-fail -fmt json -out results.json ./..."
27+
28+ - name : Check Gosec Results
29+ run : |
30+ FOUND=$(jq '.Stats.found // 0' results.json)
31+ echo "Gosec found $FOUND issue(s)"
32+ if [ "$FOUND" -gt 0 ]; then
33+ echo "❌ Security issues detected! Please fix them before merging."
34+ exit 1
35+ else
36+ echo "✅ No security issues found."
37+ fi
38+
39+ - name : Run zizmor 🌈
40+ uses : zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
41+ with :
42+ inputs : .
You can’t perform that action at this time.
0 commit comments