Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install YAML validator
run: python -m pip install --disable-pip-version-check yamllint==1.35.1

- name: Validate YAML
run: |
find . -type f \( -name '*.yaml' -o -name '*.yml' \) -print0 | xargs -0 -r yamllint

- name: Validate JSON
run: |
found=0
while IFS= read -r -d '' file; do
found=1
jq empty "$file"
done < <(find . -type f -name '*.json' -print0)
if [ "$found" -eq 0 ]; then
echo "No JSON files found; skipping."
fi

- name: Validate TOML
run: |
found=0
while IFS= read -r -d '' file; do
found=1
python -c 'import pathlib,sys,tomllib; tomllib.loads(pathlib.Path(sys.argv[1]).read_text())' "$file"
echo "valid TOML: $file"
done < <(find . -type f -name '*.toml' -print0)
if [ "$found" -eq 0 ]; then
echo "No TOML files found; skipping."
fi

secret-scan:
name: Secret Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version: "1.23.x"

- name: Install gitleaks
run: go install github.com/zricethezav/gitleaks/v8@v8.21.2

- name: Run gitleaks
run: gitleaks detect --source . --verbose --redact
7 changes: 7 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: default

rules:
document-start: disable
line-length:
max: 120
truthy: disable
Loading