mirror of
https://github.com/imjasonh/git-k8s
synced 2026-07-13 00:48:34 +00:00
Triggers on pushes to main that touch .github/workflows/*.md files. Installs gh-aw, compiles all agentic workflow markdown files, and commits the resulting .lock.yml files back to the repo. https://claude.ai/code/session_01JTYNSeJrGzdW6wfAUbdjjw
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Compile Agentic Workflows
|
|
|
|
on:
|
|
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: |
|
|
for f in .github/workflows/*.md; do
|
|
echo "Compiling ${f}..."
|
|
gh aw compile "$f"
|
|
done
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
- name: Commit and push lock files if changed
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
git add .github/workflows/*.lock.yml
|
|
if git diff --cached --quiet; then
|
|
echo "No lock file changes to commit."
|
|
else
|
|
git commit -m "Recompile agentic workflow lock files"
|
|
git push
|
|
fi
|