forked from xMikux/Slimefun-Resourcepack
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (95 loc) · 2.79 KB
/
resuable_ia.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Resuable | Makeup IA Respack
on:
workflow_call:
inputs:
debug:
type: boolean
required: false
pack_format_version_str:
type: string
required: true
secrets:
RCON_PASSWORD:
required: true
S3_ACCESS_KEY:
required: true
S3_SECRET_KEY:
required: true
S3_BUCKET_NAME:
required: true
jobs:
ia_resourcepack:
name: Generate IA Resourcepack
runs-on: ubuntu-latest
steps:
-
name: Setup - Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Setup - S3cmd Cli Tool
uses: s3-actions/[email protected]
with:
provider: "vultr"
region: "sgp1"
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
-
name: Setup - mcrcon
run: |
mkdir tools
cd tools || exit 1
wget -O mcrcon.tar.gz https://github.com/Tiiffi/mcrcon/releases/download/v0.7.2/mcrcon-0.7.2-linux-x86-64.tar.gz
tar xzvf mcrcon.tar.gz
rm LICENSE mcrcon.tar.gz
working-directory: .github
-
name: S3 - Download Plugins
run: |
mkdir external
s3cmd get s3://${{ secrets.S3_BUCKET_NAME }}/ItemsAdder.jar external/ItemsAdder.jar
-
name: Setup - Version Replace
run: |
sed -i 's/${VERSION_PLACEHOLDER}/${{ inputs.pack_format_version_str }}/' Resourcepack/contents/_iainternal/resourcepack/pack.mcmeta
-
name: Setup - IA Minecraft Server
run: |
mkdir output
docker compose -f .github/compose/docker-compose.yml up -d
env:
RCON_ENV: ${{ secrets.RCON_PASSWORD }}
-
name: Health - Check server is online
uses: raschmitt/wait-for-healthy-container/@master
with:
container-name: itemsadder_server
timeout: 120
-
name: mcrcon - Run IA commands
run: |
$GITHUB_WORKSPACE/.github/tools/mcrcon "iareload"
sleep 16
$GITHUB_WORKSPACE/.github/tools/mcrcon "iazip"
sleep 30
env:
MCRCON_PASS: ${{ secrets.RCON_PASSWORD }}
-
name: DEBUG - Get compose log
if: ${{ inputs.debug == true }}
run: |
docker compose -f .github/compose/docker-compose.yml logs > .github/compose.log
-
name: DEBUG - Upload compose log
if: ${{ inputs.debug == true }}
uses: actions/upload-artifact@v4
with:
name: compose-log
path: .github/compose.log
-
name: Artifact - Upload generated pack
uses: actions/upload-artifact@v4
with:
name: ia-generatedpack
path: output/generated.zip