From 01155ef4a3f31beab812fae1b0847c70e34f6172 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Fri, 11 Mar 2022 13:48:24 -0500 Subject: [PATCH] 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' --- .github/workflows/localize.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/localize.yml b/.github/workflows/localize.yml index e9407c08..c587dcc9 100644 --- a/.github/workflows/localize.yml +++ b/.github/workflows/localize.yml @@ -3,11 +3,14 @@ name: localize on: push: branches: [nightly] + paths-ignore: + - 'locale/**' workflow_dispatch: jobs: localize: name: Update Localization + if: ${{ github.event.pull_request.merged }} runs-on: ubuntu-latest steps: - name: Checkout @@ -20,7 +23,7 @@ jobs: - name: Set up Python 3.9 Dependencies run: | - cd ./locale + cd ./scripts python -m pip install --upgrade pip setuptools python -m pip install -r requirements.txt @@ -32,7 +35,7 @@ jobs: - name: Update Strings run: | - python ./locale/_locale.py --extract --init --update + python ./scripts/_locale.py --extract --init --update - name: GitHub Commit & Push # push changes back into nightly uses: actions-js/push@v1.2