mirror of
https://github.com/NatsumeLS/Gakumas-Translation-Data-EN.git
synced 2026-02-04 09:04:54 +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:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -70,7 +71,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git add local-files/*.json local-files/**/*.json
|
git add local-files/*.json local-files/**/*.json
|
||||||
git commit -m "chore(format): Format and Sort JSON files"
|
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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|||||||
Reference in New Issue
Block a user