-
Notifications
You must be signed in to change notification settings - Fork 114
55 lines (46 loc) · 1.64 KB
/
Copy pathupdate-localization.yml
File metadata and controls
55 lines (46 loc) · 1.64 KB
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
name: Update Localization Submodule
on:
workflow_dispatch: # Manual trigger
schedule:
- cron: "20 10 * * *" # Runs at 10:20 am everyday
permissions:
contents: write
pull-requests: write
jobs:
update-localization:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update submodule to latest main
run: |
cd ts/localization
git fetch origin main
git checkout FETCH_HEAD
cd ../..
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No submodule changes detected"
else
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "Submodule changes detected"
fi
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
with:
commit-message: "chore: update localization submodule"
branch: update-localization
delete-branch: true
title: "chore: Update localization submodule"
body: |
## Changes
- Updated `session-localization` submodule to latest `feature/update-crowdin-translations`
This updates the translations with the latest changes from Crowdin.
Auto-generated by workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}