mirror of
https://github.com/imjasonh/git-k8s
synced 2026-07-09 07:06:52 +00:00
Now that the PAT secret is configured, use it directly instead of the fallback expression. Also removed the permissions block since the PAT handles authorization. https://claude.ai/code/session_01JTYNSeJrGzdW6wfAUbdjjw
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Compile Agentic Workflows
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/*.md"
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- ".github/workflows/*.md"
|
|
|
|
jobs:
|
|
compile:
|
|
name: Compile
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout (push)
|
|
if: github.event_name == 'push'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Checkout (PR head branch)
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Install gh-aw extension
|
|
run: gh extension install github/gh-aw
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Compile all agentic workflows
|
|
run: gh aw compile .github/workflows/*.md
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_PAT }}
|
|
|
|
- name: Commit and push lock files if changed
|
|
run: |
|
|
git add .github/workflows/*.lock.yml || true
|
|
if git diff --cached --quiet; then
|
|
echo "Lock files are up to date."
|
|
else
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git commit -m "Recompile agentic workflow lock files"
|
|
git push
|
|
fi
|