mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-28 07:34:55 -05:00
install the runner in /usr/local/bin
* when downloaded * when built from sources
This commit is contained in:
parent
dede81c801
commit
1535c75993
2 changed files with 5 additions and 5 deletions
|
@ -36,7 +36,7 @@ function build_runner() {
|
|||
git checkout "$version"
|
||||
make build
|
||||
)
|
||||
mv $dir/forgejo-runner/forgejo-runner .
|
||||
./forgejo-runner --version
|
||||
mv $dir/forgejo-runner/forgejo-runner /usr/local/bin
|
||||
forgejo-runner --version
|
||||
rm -fr "$dir"
|
||||
}
|
||||
|
|
|
@ -20,11 +20,11 @@ function download() {
|
|||
local version="$2"
|
||||
|
||||
if ! which forgejo-runner > /dev/null; then
|
||||
if ! curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-${version#v}-linux-amd64 > /bin/forgejo-runner ; then
|
||||
if ! curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-${version#v}-linux-amd64 > /usr/local/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
|
||||
curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-linux-amd64 > /usr/local/bin/forgejo-runner
|
||||
fi
|
||||
chmod 755 /bin/forgejo-runner
|
||||
chmod 755 /usr/local/bin/forgejo-runner
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue