Skip to content

Update Detector

Update Detector #27

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"