-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (46 loc) · 1.43 KB
/
translations.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
51
52
53
54
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