Merge pull request 'Add homelab Gitea Actions CI (generic)' (#1) from ci/bootstrap-gitea-actions-baseline into master
This commit is contained in:
commit
6c85e36f5f
42
.gitea/workflows/ci.yml
Normal file
42
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
# ci-sync: 2026-05-30T01:30:14Z
|
||||||
|
# Homelab CI — baseline secret scan (git-ci-02)
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master, main]
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
skip-ci-check:
|
||||||
|
runs-on: [homelab, self-hosted, linux]
|
||||||
|
container:
|
||||||
|
image: node:20-bookworm
|
||||||
|
outputs:
|
||||||
|
should-skip: ${{ steps.check.outputs.skip }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- id: check
|
||||||
|
run: |
|
||||||
|
SKIP=0
|
||||||
|
BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
|
MSG="${GITHUB_EVENT_HEAD_COMMIT_MESSAGE:-$(git log -1 --pretty=%B 2>/dev/null || true)}"
|
||||||
|
echo "$BRANCH" "$MSG" | grep -qi '@skipci' && SKIP=1
|
||||||
|
echo "skip=$SKIP" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
secret-scan:
|
||||||
|
needs: skip-ci-check
|
||||||
|
if: needs.skip-ci-check.outputs.should-skip != '1'
|
||||||
|
runs-on: [homelab, self-hosted, linux, heavy]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Gitleaks
|
||||||
|
run: |
|
||||||
|
docker run --rm -v "$PWD:/repo" ghcr.io/gitleaks/gitleaks:latest \
|
||||||
|
detect --source /repo --no-banner --redact
|
||||||
Loading…
x
Reference in New Issue
Block a user