diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-06-08 23:30:12 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-06-09 05:17:22 +0300 |
commit | 09a6f4e5e6db2b54cd5d403d09956835157aa726 (patch) | |
tree | bf3caeeaf2bdb7b771866dbed541f847955cf25c /.github/workflows/update-po.yml | |
parent | 4bff149e2385ff1fdd34b358ddf36e4926c95068 (diff) |
Add update translation files GitHub action
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to '.github/workflows/update-po.yml')
-rw-r--r-- | .github/workflows/update-po.yml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/update-po.yml b/.github/workflows/update-po.yml new file mode 100644 index 0000000000..bae7593af2 --- /dev/null +++ b/.github/workflows/update-po.yml @@ -0,0 +1,58 @@ +name: Update translation files + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' + +jobs: + update-po: + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: ["8.0"] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Gettext + run: | + sudo apt-get install -y gettext + + - name: Install PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: composer:v2 + + - name: Get Composer cache directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }} + restore-keys: | + composer-${{ runner.os }}-${{ matrix.php-version }}- + + - name: Install dependencies + run: | + composer update --no-interaction --no-progress + + - name: Setup 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 |