fix: use create-pull-request action for protected branch

This commit is contained in:
Aditya
2026-03-23 16:09:10 +05:30
parent 739832eb5b
commit 44132282a1

View File

@@ -31,9 +31,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python scraper/scraper.py
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add data/tools.json
git diff --quiet && git diff --staged --quiet || (git commit -m 'chore: nightly data enrichment [skip ci]' && git push)
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: nightly data enrichment [skip ci]'
title: 'chore: nightly GitHub data enrichment'
body: |
Automated nightly update of GitHub metadata for open-source tools.
- Stars, last commit, language, and license fields refreshed.
branch: chore/nightly-enrichment
delete-branch: true
labels: automated