-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (61 loc) · 1.68 KB
/
spider.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
name: Spider
on:
workflow_dispatch:
inputs:
gameVersion:
description: "Game Version"
type: choice
options:
- "1.16"
- "1.17"
- "1.18"
- "1.19"
required: true
modCount:
description: "Number of mods to download"
type: choice
options:
- "10"
- "50"
- "100"
- "200"
- "500"
- "1000"
- "2000"
- "5000"
- "10000"
required: true
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download files
uses: RPMTW/Translation-Scripts@1.1.5
with:
action: "spider"
args: ${{ github.event.inputs.modCount }}
gameVersion: ${{ github.event.inputs.gameVersion }}
- name: Move files
run: |
if [ ! -d source ] ; then
mkdir source
fi
if [ ! -d source/zh_tw ] ; then
mkdir source/zh_tw
fi
if [ -d ${{ github.event.inputs.gameVersion }} ] ; then
cp -R -f ${{ github.event.inputs.gameVersion }}/* source/zh_tw/${{ github.event.inputs.gameVersion }}
rm -R ${{ github.event.inputs.gameVersion }}
fi
- name: Push changes
uses: github-actions-x/commit@v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: ${{ github.event.inputs.ref }}
commit-message: Upload source files
force-add: true
files: ./source
name: RPMTW Github Bot
email: 41898282+github-actions[bot]@users.noreply.github.com
rebase: true