diff --git a/.github/workflows/compile-workflows.yaml b/.github/workflows/compile-workflows.yaml new file mode 100644 index 0000000..cb1a4b0 --- /dev/null +++ b/.github/workflows/compile-workflows.yaml @@ -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