Update trigger events
- Don't run if commits are all in 'locale' directory - Allows pushing changes back into nightly from this workflow without triggering and endless loop - Don't run job unless event is 'pull_request.merged'
This commit is contained in:
parent
88cf616a48
commit
01155ef4a3
1 changed files with 5 additions and 2 deletions
7
.github/workflows/localize.yml
vendored
7
.github/workflows/localize.yml
vendored
|
|
@ -3,11 +3,14 @@ name: localize
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [nightly]
|
branches: [nightly]
|
||||||
|
paths-ignore:
|
||||||
|
- 'locale/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
localize:
|
localize:
|
||||||
name: Update Localization
|
name: Update Localization
|
||||||
|
if: ${{ github.event.pull_request.merged }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -20,7 +23,7 @@ jobs:
|
||||||
|
|
||||||
- name: Set up Python 3.9 Dependencies
|
- name: Set up Python 3.9 Dependencies
|
||||||
run: |
|
run: |
|
||||||
cd ./locale
|
cd ./scripts
|
||||||
python -m pip install --upgrade pip setuptools
|
python -m pip install --upgrade pip setuptools
|
||||||
python -m pip install -r requirements.txt
|
python -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
@ -32,7 +35,7 @@ jobs:
|
||||||
|
|
||||||
- name: Update Strings
|
- name: Update Strings
|
||||||
run: |
|
run: |
|
||||||
python ./locale/_locale.py --extract --init --update
|
python ./scripts/_locale.py --extract --init --update
|
||||||
|
|
||||||
- name: GitHub Commit & Push # push changes back into nightly
|
- name: GitHub Commit & Push # push changes back into nightly
|
||||||
uses: actions-js/push@v1.2
|
uses: actions-js/push@v1.2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue