mirror of
https://github.com/NatsumeLS/Gakumas-Translation-Data-EN.git
synced 2026-02-04 00:54:53 +00:00
chore(check.yml): add write permission for pull-requests
chore(check.yml): update git push command to push to the correct branch based on event type
This commit is contained in:
7
.github/workflows/check.yml
vendored
7
.github/workflows/check.yml
vendored
@@ -42,6 +42,7 @@ jobs:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -70,7 +71,11 @@ jobs:
|
||||
run: |
|
||||
git add local-files/*.json local-files/**/*.json
|
||||
git commit -m "chore(format): Format and Sort JSON files"
|
||||
git push origin main
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
git push origin HEAD:${{ github.head_ref }}
|
||||
else
|
||||
git push origin main
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||
continue-on-error: true
|
||||
|
||||
Reference in New Issue
Block a user