Files
stack/.gitea/workflows/pkg-supply-chain.yml
kert d64c07f271
Some checks failed
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / notebooks-smoke (push) Has been cancelled
Deploy / changes (push) Has been cancelled
Deploy / notebooks (push) Has been cancelled
Deploy / zotero (push) Has been cancelled
Deploy / docs (push) Has been cancelled
Deploy / api (push) Has been cancelled
Deploy / bcda (push) Has been cancelled
Deploy / llm (push) Has been cancelled
Deploy / mc (push) Has been cancelled
Deploy / report (push) Has been cancelled
fix(ci): don't file failure issues for Renovate's branches
A red renovate/* branch already stays unmerged and shows on Renovate's
Dependency Dashboard; the auto-filer added an issue per failed job on
top (ten from today's first Renovate batch, #1397–#1407). The failure
step now skips branches named renovate/*, both as the push ref and as a
PR head. Regenerated via gen_config.py; pkg-supply-chain.yml, which
gen_config no longer emits, is edited the same way by hand.
2026-10-29 19:09:56 -04:00

74 lines
2.4 KiB
YAML

# DO NOT EDIT — generated by gen_config.py from stack.toml
# Re-generate: uv run python dev/scripts/gen_config.py
name: Package Supply Chain
on:
push:
paths:
- "**/Dockerfile*"
- "pyproject.toml"
- "uv.lock"
- "docs/package.json"
- "docs/pnpm-lock.yaml"
workflow_dispatch:
schedule:
- cron: "0 6 * * *"
jobs:
pkg-supply-chain:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Install dependencies
run: uv sync --no-dev
- name: Package inventory
run: uv run python dev/scripts/pkg_inventory.py
- name: Check manifest freshness
run: uv run python dev/scripts/pkg_inventory.py --check
- name: Sync to Gitea package registry
env:
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: uv run python dev/scripts/pkg_mirror_sync.py
- name: Drift detection
run: uv run python dev/scripts/pkg_drift.py
- name: Install trivy
run: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/v0.76.0/contrib/install.sh | sh -s -- -b /usr/local/bin v0.76.0
- name: Vulnerability scan
run: |
set -euo pipefail
trivy fs --scanners vuln --format json -o data/pkg-vulns.json uv.lock
trivy fs --scanners vuln --format json -o data/pkg-vulns-pyproject.json pyproject.toml
# The docs site's build toolchain — never scanned before (116 CVEs, 2026-10-27).
trivy fs --scanners vuln --format json -o data/pkg-vulns-docs.json docs/pnpm-lock.yaml
- name: Auto-create issues for drift and vulns
env:
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: uv run python dev/scripts/pkg_issues.py
- name: File failure issue
if: failure() && !startsWith(github.head_ref || github.ref_name, 'renovate/')
env:
GITEA_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
uv sync --no-dev --quiet 2>/dev/null || true
uv run python -m api.diag.ci \
--workflow "Package Supply Chain" --job "pkg-supply-chain" \
--run "${{ github.run_number }}" \
--sha "${{ github.sha }}" \
--ref "${{ github.ref }}" || true