Welcome to mirror list, hosted at ThFree Co, Russian Federation.

update-po.yml « workflows « .github - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ac07c2592cb426141188baf6f7e4c4a8b6ee816d (plain)
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
37
38
39
40
41
42
43
44
45
46
47
name: Update translation files

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * 0'

jobs:
  update-po:
    name: Update po files
    runs-on: ubuntu-latest
    # Source: https://github.community/t/do-not-run-cron-workflows-in-forks/17636/2?u=williamdes
    if: (github.event_name == 'schedule' && github.repository == 'phpmyadmin/phpmyadmin') || (github.event_name != 'schedule')
    strategy:
      matrix:
        php-version: ["8.0"]
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Install Gettext
        run: |
          sudo apt-get install -y gettext

      - name: Set up PHP ${{ matrix.php-version }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          tools: composer:v2

      - name: Install Composer dependencies
        uses: ramsey/composer-install@v1
        with:
          dependency-versions: highest

      - name: Set up git config
        run: |
          git config user.name "phpMyAdmin bot"
          git config user.email bot@phpmyadmin.net

      - name: Update PO files
        run: |
          ./scripts/update-po

      - name: Push changes
        run: |
          git push