mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-23 23:21:03 -05:00
do not try to install the runner if it already available
This commit is contained in:
parent
f66ab11375
commit
e97991ef78
1 changed files with 7 additions and 4 deletions
|
@ -13,8 +13,10 @@ function download() {
|
||||||
local runner_repository="$1"
|
local runner_repository="$1"
|
||||||
local version="$2"
|
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
|
curl -L --fail -sS $runner_repository/releases/download/$version/forgejo-runner-amd64 > /bin/forgejo-runner
|
||||||
chmod 755 /bin/forgejo-runner
|
chmod 755 /bin/forgejo-runner
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function register() {
|
function register() {
|
||||||
|
@ -24,7 +26,8 @@ function register() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
daemon --chdir=$(pwd) --unsafe --pidfile=$(pwd)/forgejo-runner-pid --errlog=$(pwd)/forgejo-runner.log --output=$(pwd)/forgejo-runner.log /bin/forgejo-runner daemon
|
rm -f forgejo-runner.log
|
||||||
|
daemon --chdir=$(pwd) --unsafe --pidfile=$(pwd)/forgejo-runner-pid --errlog=$(pwd)/forgejo-runner.log --output=$(pwd)/forgejo-runner.log forgejo-runner daemon
|
||||||
sleep 1
|
sleep 1
|
||||||
cat forgejo-runner.log
|
cat forgejo-runner.log
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue