Skip to content

Translations

Translations #392

Workflow file for this run

name: Translations
on:
push:
branches:
- master
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
permissions:
contents: read
id-token: write
jobs:
update_translations:
runs-on: ubuntu-latest
steps:
- name: Setup Shopware
uses: shopware/setup-shopware@main
with:
shopware-version: trunk
- uses: octo-sts/action@main
id: octo-sts
with:
scope: shopware/SwagLanguagePack
identity: translations
- name: Clone Extension
uses: actions/checkout@v4
with:
path: custom/plugins/${{ github.event.repository.name }}
token: ${{ steps.octo-sts.outputs.token }}
- name: Install extension with Composer
run: composer require $(composer -d custom/plugins/${{ github.event.repository.name }} config name)
- name: Download translations
working-directory: custom/plugins/${{ github.event.repository.name }}
run: ./bin/download-translations.sh
- name: Push translations
working-directory: custom/plugins/${{ github.event.repository.name }}
run: |
if [[ -z $(git status -s) ]]; then
echo "No changes detected"
exit 0
fi
git config user.name shopwareBot
git config user.email development@shopware.com
git add ./src
git commit -m "Update translations $(date +%Y-%m-%d)"
git push