1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2024-09-18 17:36:16 +00:00

v3.0.0 and above have a different naming scheme

This commit is contained in:
Earl Warren 2023-10-04 17:01:08 +02:00
parent 96cc7b4991
commit 78e5741fba
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -16,7 +16,10 @@ function download() {
local version="$2"
if ! which forgejo-runner > /dev/null; then
curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-amd64 > /bin/forgejo-runner
if ! curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-${version#v}-linux-amd64 > /bin/forgejo-runner ; then
# backward compatibility for for the naming scheme prior to 3.0.0
curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-linux-amd64 > /bin/forgejo-runner
fi
chmod 755 /bin/forgejo-runner
fi
}