Update translation files #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
with: | |
dependency-versions: highest | |
- name: Set up git config | |
run: | | |
git config user.name "phpMyAdmin bot" | |
git config user.email [email protected] | |
- name: Update PO files | |
run: | | |
./scripts/update-po | |
- name: Push changes | |
run: | | |
git push |