36 строки
1.2 KiB
YAML
36 строки
1.2 KiB
YAML
name: Sync Localization Branch
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'main'
|
|
types: [closed]
|
|
|
|
concurrency:
|
|
group: 'Localization-Sync'
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
replaceLocalizationBranch:
|
|
name: 'Replace Localization Branch'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'Check for Fork'
|
|
run: echo "Action cannot be executed on forks" && exit 1
|
|
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
|
|
|
- uses: dawidd6/action-delete-branch@v3
|
|
name: 'delete'
|
|
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }}
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branches: Localization
|
|
soft_fail: true
|
|
|
|
- uses: peterjgrainger/action-create-branch@v2.0.1
|
|
name: 'Create Localization Branch'
|
|
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
branch: 'Localization'
|