about summary refs log tree commit diff
path: root/.github/workflows/nightly-update-source-languages.yaml
blob: e3687bd47d4e92bfc88ed5d9dff5836792fd8121 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Nightly Update Source Languages
on:
  schedule:
    - cron: '0 2 * * *' # run at 2 AM UTC
  workflow_dispatch:

jobs:
  extract-languages:
    name: Nightly Update Source Languages
    runs-on: ubuntu-latest

    permissions:
      # Give the default GITHUB_TOKEN write permission to commit and push the
      # added or changed files to the repository.
      contents: write

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3
      - name: Install node
        uses: actions/setup-node@v4
        with:
          node-version-file: .nvmrc
      - name: Yarn install
        uses: Wandalen/wretry.action@master
        with:
          command: yarn --frozen-lockfile
          attempt_limit: 3
          attempt_delay: 2000
      - name: Extract language strings
        run: yarn intl:extract
      - name: Create commit
        uses: stefanzweifel/git-auto-commit-action@v5
        with:
          commit_message: Nightly source-language update
          file_pattern: ./src/locale/locales/en/messages.po