ci: Avoid repository push access token

This commit is contained in:
Pun Butrach 2025-04-14 19:08:01 +07:00 committed by GitHub
parent 1c84265dc4
commit 23dcbbecb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,9 @@ jobs:
sync: sync:
name: Sync name: Sync
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -39,10 +42,8 @@ jobs:
pull_request_body: "Sync translations from [crowdin.com/project/revanced](https://crowdin.com/project/revanced)" pull_request_body: "Sync translations from [crowdin.com/project/revanced](https://crowdin.com/project/revanced)"
pull_request_base_branch_name: "dev" pull_request_base_branch_name: "dev"
commit_message: "chore: Sync translations" commit_message: "chore: Sync translations"
github_user_name: revanced-bot
github_user_email: github@revanced.app
env: env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
@ -69,8 +70,6 @@ jobs:
- name: Commit translations - name: Commit translations
run: | run: |
git config user.name revanced-bot
git config user.email github@revanced.app
sudo chown -R $USER:$USER .git sudo chown -R $USER:$USER .git
git commit -m "chore: Remove empty values from JSON" assets/i18n/*.i18n.json git commit -m "chore: Remove empty values from JSON" assets/i18n/*.i18n.json
git push origin HEAD:feat/translations git push origin HEAD:feat/translations