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:
parent
14f8a2f612
commit
dfacd609b5
1 changed files with 2 additions and 2 deletions
4
.github/workflows/compile-workflows.yaml
vendored
4
.github/workflows/compile-workflows.yaml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue