1
0
Fork 0
mirror of https://github.com/imjasonh/git-k8s synced 2026-07-09 07:06:52 +00:00

Add workflows: write permission to compile workflow

The GITHUB_TOKEN needs the workflows permission to push changes to
files under .github/workflows/. Also add || true to git add glob
in case no lock files exist yet on first compile.

https://claude.ai/code/session_01JTYNSeJrGzdW6wfAUbdjjw
This commit is contained in:
Claude 2026-02-28 16:02:27 +00:00
parent 14f8a2f612
commit dfacd609b5
No known key found for this signature in database

View file

@ -13,6 +13,7 @@ on:
permissions:
contents: write
pull-requests: write
workflows: write
jobs:
compile:
@ -29,7 +30,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# Use default GITHUB_TOKEN — needs contents: write permission
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install gh-aw extension
@ -44,7 +44,7 @@ jobs:
- name: Commit and push lock files if changed
run: |
git add .github/workflows/*.lock.yml
git add .github/workflows/*.lock.yml || true
if git diff --cached --quiet; then
echo "Lock files are up to date."
else