-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (76 loc) · 4.14 KB
/
update_detector.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
name: Update Detector
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
jobs:
check_for_updates:
runs-on: ubuntu-latest
name: Check for updates
steps:
- name: Check out the repository
uses: actions/[email protected]
- name: SkinsRestorer
run: |
resourceID='2124'
resp=$(curl --silent -X 'GET' "https://api.spiget.org/v2/resources/$resourceID/versions/latest" -H 'accept: application/json')
echo "$resp"
latestVers=$(echo "$resp" | jq -r .id)
echo "$latestVers"
# currentVers=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=SKINRESTORE_VERS=")[0-9]+')
# echo "$currentVers"
# https://download.geysermc.org/v2/projects/geyser/versions/$GEYSER_VERS/builds/$GEYSER_BUILD/downloads/velocity
- name: Geyser
run: |
resp=$(curl --silent -X 'GET' "https://download.geysermc.org/v2/projects/geyser" -H 'accept: application/json')
echo "$resp"
latestVers=$(echo "$resp" | jq -r .versions.[-1])
echo "$latestVers"
resp2=$(curl --silent -X 'GET' "https://download.geysermc.org/v2/projects/geyser/versions/$latestVers" -H 'accept: application/json')
echo "$resp2"
latestBuild=$(echo "$resp2" | jq -r .builds.[-1])
echo "$latestBuild"
currentVers=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=GEYSER_VERS=")[0-9]+\.[0-9]+\.[0-9]+')
echo "$currentVers"
currentBuild=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=GEYSER_BUILD=")[0-9]+')
echo "$currentBuild"
- name: Floodgate
run: |
resp=$(curl --silent -X 'GET' "https://download.geysermc.org/v2/projects/floodgate" -H 'accept: application/json')
echo "$resp"
latestVers=$(echo "$resp" | jq -r .versions.[-1])
echo "$latestVers"
resp2=$(curl --silent -X 'GET' "https://download.geysermc.org/v2/projects/floodgate/versions/$latestVers" -H 'accept: application/json')
echo "$resp2"
latestBuild=$(echo "$resp2" | jq -r .builds.[-1])
echo "$latestBuild"
currentVers=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=FLOOD_VERS=")[0-9]+\.[0-9]+\.[0-9]+')
echo "$currentVers"
currentBuild=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=FLOOD_BUILD=")[0-9]+')
echo "$currentBuild"
- name: ViaVersion
run: |
latestVers=$(curl --silent -X 'GET' \
-H "Accept-Language: en" -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" \
"https://hangar.papermc.io/api/v1/projects/ViaVersion/latestrelease" -H 'accept: application/json')
echo "$latestVers"
currentVers=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=VIAVERSION_VERS=")[0-9]+\.[0-9]+\.[0-9]+')
echo "$currentVers"
- name: ViaBackwards
run: |
latestVers=$(curl --silent \
-X 'GET' -H "Accept-Encoding: identity" \
-H "Accept-Language: en" -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" \
"https://hangar.papermc.io/api/v1/projects/ViaBackwards/latestrelease" -H 'accept: application/json')
echo "$latestVers"
currentVers=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=VIABACKWARDS_VERS=")[0-9]+\.[0-9]+\.[0-9]+')
echo "$currentVers"
- name: ViaRewind
run: |
latestVers=$(curl --silent \
-X 'GET' -H "Accept-Encoding: identity" \
-H "Accept-Language: en" -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" \
"https://hangar.papermc.io/api/v1/projects/ViaRewind/latestrelease" -H 'accept: application/json')
echo "$latestVers"
currentVers=$(cat ./mc-all-platform-velocity/Dockerfile | grep -Po '(?<=VIAREWIND_VERS=")[0-9]+\.[0-9]+\.[0-9]+')
echo "$currentVers"