ci: use bot to update locales

This commit is contained in:
jo 2023-02-27 12:36:56 +01:00 committed by Kyle Robbertze
parent d4a4c34c4d
commit be3964c108
1 changed files with 11 additions and 3 deletions

View File

@ -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"