From bd4c833c437e1aef4821aef845ebdca3853dccc0 Mon Sep 17 00:00:00 2001 From: tosta Date: Sat, 4 Nov 2023 19:01:06 +0100 Subject: [PATCH 1/3] #530 cronjob for i18n repeat values --- .github/workflows/worker.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/worker.yaml diff --git a/.github/workflows/worker.yaml b/.github/workflows/worker.yaml new file mode 100644 index 000000000..a4362cd9d --- /dev/null +++ b/.github/workflows/worker.yaml @@ -0,0 +1,31 @@ +name: Find Repeat i18n Values + + + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * +on: + schedule: + - cron: '0 18 */14 * 1' # At 00:00 on Monday + +jobs: + worker: + runs-on: ubuntu-latest + steps: + - name: checkout repo content + uses: actions/checkout@v4 + + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: execute py script + working-directory: ./frontend/i18n + run: python find_repeat_i18n_values.py From c2121b81f2ae25a252d659127c31df1589c20804 Mon Sep 17 00:00:00 2001 From: tosta Date: Sat, 4 Nov 2023 19:02:32 +0100 Subject: [PATCH 2/3] time annotation --- .github/workflows/worker.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/worker.yaml b/.github/workflows/worker.yaml index a4362cd9d..0b0b513be 100644 --- a/.github/workflows/worker.yaml +++ b/.github/workflows/worker.yaml @@ -12,7 +12,7 @@ name: Find Repeat i18n Values # * * * * * on: schedule: - - cron: '0 18 */14 * 1' # At 00:00 on Monday + - cron: '0 18 */14 * 1' # Runs at 18:00, every 14 days, and on Monday jobs: worker: @@ -28,4 +28,4 @@ jobs: - name: execute py script working-directory: ./frontend/i18n - run: python find_repeat_i18n_values.py + run: python find_repeat_i18n_values.py From 84566eb951017af9d18f50b0663758de5eddcc31 Mon Sep 17 00:00:00 2001 From: tosta Date: Sun, 5 Nov 2023 11:09:09 +0100 Subject: [PATCH 3/3] from cronjob to triggered by changes to file --- .github/workflows/worker.yaml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/worker.yaml b/.github/workflows/worker.yaml index 0b0b513be..64504dc4a 100644 --- a/.github/workflows/worker.yaml +++ b/.github/workflows/worker.yaml @@ -1,18 +1,16 @@ name: Find Repeat i18n Values - - # ┌───────────── minute (0 - 59) - # │ ┌───────────── hour (0 - 23) - # │ │ ┌───────────── day of the month (1 - 31) - # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) - # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) - # │ │ │ │ │ - # │ │ │ │ │ - # │ │ │ │ │ - # * * * * * on: - schedule: - - cron: '0 18 */14 * 1' # Runs at 18:00, every 14 days, and on Monday + pull_request: + branches: + - main + types: [opened, reopened, synchronize] + paths: + - "**/en-US.json" + push: + branches: -main + paths: + - "**/en-US.json" jobs: worker: @@ -24,7 +22,7 @@ jobs: - name: setup python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: "3.11" - name: execute py script working-directory: ./frontend/i18n