Skip to content

Commit 44c6a99

Browse files
Workflow: commit only README.md and version-history.json to avoid workflow permission error
1 parent 9a096a9 commit 44c6a99

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/update.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ jobs:
3939
- name: Check for changes
4040
id: git-check
4141
run: |
42-
git diff --quiet version-history.json || echo "changes=true" >> $GITHUB_OUTPUT
42+
if git diff --quiet -- version-history.json README.md; then
43+
echo "changes=false" >> $GITHUB_OUTPUT
44+
else
45+
echo "changes=true" >> $GITHUB_OUTPUT
46+
fi
4347
4448
- name: Commit and push if changed
4549
if: steps.git-check.outputs.changes == 'true'
4650
run: |
4751
git config --global user.email "[email protected]"
4852
git config --global user.name "GitHub Action"
49-
git add --all
53+
# Only commit the files we intentionally update
54+
git add -- version-history.json README.md
5055
git commit -m "Update Cursor download links and version history"
5156
git push
5257

0 commit comments

Comments
 (0)