-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 2.17 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
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 -Eo '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"
- 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"