fix: badge workflow commits directly instead of creating PRs (#121)
* fix: badge workflow commits directly instead of creating PRs Replace peter-evans/create-pull-request with direct git push. Removes need for pull-requests:write permission and the repo setting 'Allow GitHub Actions to create pull requests'. Uses [skip ci] in commit message to avoid triggering itself. * chore: trigger CI
This commit is contained in:
@@ -12,7 +12,6 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-badges:
|
update-badges:
|
||||||
@@ -92,17 +91,14 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Commit and push badge updates
|
||||||
uses: peter-evans/create-pull-request@v7
|
run: |
|
||||||
with:
|
git config user.name "github-actions[bot]"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
commit-message: 'chore: update test count badges'
|
git add README.md
|
||||||
title: 'chore: update test count badges'
|
if git diff --cached --quiet; then
|
||||||
body: |
|
echo "No badge changes to commit"
|
||||||
Automated update of test count badges in README.md.
|
else
|
||||||
|
git commit -m "chore: update test count badges [skip ci]"
|
||||||
- Backend tests: ${{ steps.backend-tests.outputs.count }}
|
git push
|
||||||
- Frontend tests: ${{ steps.frontend-tests.outputs.count }}
|
fi
|
||||||
branch: chore/update-test-badges
|
|
||||||
delete-branch: true
|
|
||||||
labels: automated
|
|
||||||
|
|||||||
Reference in New Issue
Block a user