forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.22 KB
/
update-po.yml
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
48
49
50
name: Update translation files
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: read
jobs:
update-po:
permissions:
contents: write # for Git to git push
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.1"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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@v2
- name: Set up git config
run: |
git config user.name "phpMyAdmin bot"
git config user.email bot@phpmyadmin.net
- name: Update PO files
run: |
./bin/update-po
- name: Push changes
run: |
git push