Update Detector #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |