From be3964c1087e5919600239ae6268b2b1e5c35244 Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 27 Feb 2023 12:36:56 +0100 Subject: [PATCH] ci: use bot to update locales --- .github/workflows/legacy.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/legacy.yml b/.github/workflows/legacy.yml index 0585a3ad2..e322312d7 100644 --- a/.github/workflows/legacy.yml +++ b/.github/workflows/legacy.yml @@ -88,9 +88,15 @@ jobs: locale: runs-on: ubuntu-latest - if: github.event_name == 'schedule' + if: > + github.repository_owner == 'libretime' && ( + github.event_name == 'schedule' || + github.event_name == 'workflow_dispatch' + ) steps: - uses: actions/checkout@v3 + with: + token: ${{ secrets.LIBRETIME_BOT_TOKEN }} - name: Install dependencies run: | @@ -99,11 +105,13 @@ jobs: - name: Update locales run: | - make -C legacy/locale update - git config --global user.name "libretime-bot" git config --global user.email "libretime-bot@users.noreply.github.com" + git pull + + make -C legacy/locale update + git add legacy/locale git diff-index --quiet HEAD -- legacy/locale || { git commit --message "chore(legacy): update locales"