-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.yml
More file actions
84 lines (84 loc) · 2.89 KB
/
Copy pathci.yml
File metadata and controls
84 lines (84 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# SPDX-License-Identifier: MPL-2.0
# SPDX-FileCopyrightText: 2025 Hyperpolymath <hyperpolymath@proton.me>
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions: read-all
jobs:
validate-configs:
name: Validate Nickel Configurations
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
with:
submodules: recursive
- name: Install Nickel
run: |
curl -sSL https://github.com/tweag/nickel/releases/latest/download/nickel-x86_64-linux -o nickel
chmod +x nickel
sudo mv nickel /usr/local/bin/
- name: Validate configurations
run: |
nickel export configs/base.ncl > /dev/null
nickel export configs/modules.ncl > /dev/null
nickel export configs/environments.ncl > /dev/null
echo "✓ All Nickel configurations valid"
lint-spdx:
name: Validate SPDX Headers
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
- name: Check SPDX headers
run: |
missing=0
for file in $(find . -type f \( -name "*.ncl" -o -name "*.ex" -o -name "*.exs" -o -name "*.res" -o -name "*.ada" -o -name "*.adb" -o -name "*.ads" -o -name "*.sh" \) -not -path "./.git/*" -not -path "./modules/*"); do
if ! head -5 "$file" | grep -q "SPDX-License-Identifier"; then
echo "Missing SPDX header: $file"
missing=$((missing + 1))
fi
done
if [ $missing -gt 0 ]; then
echo "::error::$missing files missing SPDX headers"
exit 1
fi
echo "✓ All files have SPDX headers"
lint-shell:
name: Lint Shell Scripts
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
- name: Run ShellCheck
run: |
find . -name "*.sh" -not -path "./.git/*" -not -path "./modules/*" -exec shellcheck {} \;
security-scan:
name: Security Scan
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
- name: Run Trufflehog
uses: trufflesecurity/trufflehog@8a8ef8526528d8a4ff3e2c90be08e25ef8efbd9b # v3
with:
extra_args: --only-verified
check-links:
name: Check Documentation Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
- name: Link Checker
uses: lycheeverse/lychee-action@v2.7.0
with:
args: --verbose --no-progress '**/*.md' '**/*.adoc'
fail: true