Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-util/runners-supervisor: Fix upgrade process. #867

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev-util/runners-supervisor/files/runners-supervisor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ function update_check() {

# get the json with the latest information and parse it
LATEST=`curl -s -u ${GHTOKEN} https://api.github.com/repos/actions/runner/releases/latest`
[ $? -ne 0 ] && log "Failed to get the latest version" && return
# URL=`echo ${LATEST} | jq -r '.assets[].browser_download_url|select(.|contains("linux-x64"))'`
# object structure is changed, it's a list of URLs now and the last one is what we need
URL=`echo ${LATEST} | jq -r '[.assets[].browser_download_url|select(.|contains("linux-x64"))]|last'`
Expand All @@ -205,6 +206,7 @@ function update_check() {
rm -rf ${DIR}.tmp # to be sure
mkdir ${DIR}.tmp
wget -qO- ${URL} | tar xfz - -C ${DIR}.tmp
[ $? -ne 0 ] && log "Failed to download the new version" && return
mv ${DIR} ${DIR}.bak
mv ${DIR}.tmp ${DIR}
rm -rf ${DIR}.bak
Expand Down
Loading