mirror of
https://github.com/imjasonh/git-k8s
synced 2026-07-12 16:38:37 +00:00
Runs on both PRs and pushes to main. Compiles all agentic workflow markdown files and fails if the resulting lock files differ from what's committed. This ensures contributors run `gh aw compile` before merging. https://claude.ai/code/session_01JTYNSeJrGzdW6wfAUbdjjw
43 lines
1,023 B
YAML
43 lines
1,023 B
YAML
name: Compile Agentic Workflows
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/*.md"
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/*.md"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
compile:
|
|
name: Compile
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install gh-aw extension
|
|
run: gh extension install github/gh-aw
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
- name: Compile all agentic workflows
|
|
run: gh aw compile .github/workflows/*.md
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
- name: Check for lock file changes
|
|
run: |
|
|
git add .github/workflows/*.lock.yml
|
|
if git diff --cached --quiet; then
|
|
echo "Lock files are up to date."
|
|
else
|
|
echo "::error::Lock files are outdated. Run 'gh aw compile .github/workflows/*.md' and commit the results."
|
|
git diff --cached --stat
|
|
exit 1
|
|
fi
|