forked from OpenRCT2/OpenRCT2
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.49 KB
/
localisation.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
name: Localisation Merge
on:
schedule:
- cron: '0 4 * * *'
jobs:
merge-localisation:
name: Merge Localisation
if: github.repository == 'OpenRCT2/OpenRCT2'
runs-on: ubuntu-latest
steps:
- name: Store private SSH
run: |
echo "Store private SSH deploy key..."
mkdir -p ~/.ssh
echo "${{ secrets.OPENRCT2_DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
- name: Clone repositories
run: |
echo "Cloning repositories..."
git clone -b master --depth 1 [email protected]:OpenRCT2/Localisation.git Localisation
git clone -b develop [email protected]:OpenRCT2/OpenRCT2.git OpenRCT2
- name: Copy over language files
run: |
echo "Copying language files..."
for f in ./Localisation/data/language/*
do
filename=$(basename $f)
cp $f "./OpenRCT2/data/language/$filename"
done
- name: Commit and push
working-directory: OpenRCT2
run: |
if [[ $(git status --porcelain) ]]; then
echo "Committing and pushing..."
git add .
git config --global user.name "OpenRCT2 git bot"
git config --global user.email "[email protected]"
git commit -m "Merge Localisation/master into OpenRCT2/develop"
git push
echo "Complete"
else
echo "No changes to merge."
fi