mirror of
https://github.com/imjasonh/git-k8s
synced 2026-07-12 00:19:47 +00:00
Add workflow to auto-compile agentic workflow lock files
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
This commit is contained in:
parent
7ff753a73c
commit
a828ef7992
1 changed files with 45 additions and 0 deletions
45
.github/workflows/compile-workflows.yaml
vendored
Normal file
45
.github/workflows/compile-workflows.yaml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue