-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (73 loc) · 2.8 KB
/
sync-sf-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Symfony translations
on:
schedule:
- cron: '30 6,12,18 * * *'
jobs:
build:
name: Sync
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Get lowest version
id: version
run: |
set -x
version=$(curl -s https://symfony.com/releases.json | jq -r '.supported_versions[0]')
echo $version
echo "lowest_branch=$version" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
repository: symfony/symfony
ref: ${{ steps.version.outputs.lowest_branch }}
fetch-depth: 0
- name: Download dependencies
run: |
cp composer.json composer.json.bak
composer config allow-plugins true
composer update --no-interaction --prefer-stable
rm composer.json
mv composer.json.bak composer.json
- name: Generate data files
id: generate_data
run: php .github/sync-translations.php
- name: Check for changes
id: check_changes
run: |
if [[ $(git diff --numstat | wc -l) -eq 0 ]]; then
echo "No significant changes."
echo "make_pr=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "make_pr=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: ${{ steps.check_changes.outputs.make_pr == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
delete-branch: true
commit-message: "Sync translations"
author: "carsonbot <[email protected]>"
committer: "carsonbot <[email protected]>"
push-to-fork: carsonbot/symfony
title: 'Sync translations across all languages'
body: |
| Q | A
| ------------- | ---
| Branch? | ${{ steps.version.outputs.lowest_branch }}
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
We just added new English translations. This PR make sure to add them to all other languages.
-------
This PR was automatically generated by the Carsonbot. It ran the following command:
```bash
php .github/sync-translations.php
```
You can find the workflow [here](https://github.com/symfony-tools/symfony-translation-checker/blob/master/.github/workflows/sync-sf-translations.yml).