mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-30 10:11:03 -05:00
forgejo-runner needs an IP, not localhost for the artifacts server
This commit is contained in:
parent
418489ad4f
commit
b51343081a
2 changed files with 7 additions and 2 deletions
|
@ -3,6 +3,7 @@ WORK_PATH = ${WORK_PATH}
|
|||
|
||||
[server]
|
||||
APP_DATA_PATH = ${WORK_PATH}/data
|
||||
DOMAIN = ${IP}
|
||||
HTTP_PORT = 3000
|
||||
LFS_START_SERVER = true
|
||||
|
||||
|
|
|
@ -78,6 +78,10 @@ function create_user() {
|
|||
forgejo-curl.sh api_json $url/api/forgejo/v1/version
|
||||
}
|
||||
|
||||
function myip() {
|
||||
hostname -I | cut -f1 -d' '
|
||||
}
|
||||
|
||||
function start_forgejo() {
|
||||
local work_path=$DIR/forgejo-work-path
|
||||
daemon --chdir=$DIR --unsafe --env="TERM=$TERM" --env="HOME=$HOME" --env="PATH=$PATH" --pidfile=$DIR/forgejo-pid --errlog=$DIR/forgejo-err.log --output=$DIR/forgejo-out.log -- $DIR/forgejo --config $work_path/app.ini --work-path $work_path
|
||||
|
@ -88,7 +92,7 @@ function start_forgejo() {
|
|||
fi
|
||||
echo "$DIR/forgejo --config $work_path/app.ini --work-path $work_path" '"$@"' > $DIR/forgejocli
|
||||
chmod +x $DIR/forgejocli
|
||||
hostname -I | cut -f1 -d' ' > $DIR/forgejo-ip
|
||||
myip > $DIR/forgejo-ip
|
||||
}
|
||||
|
||||
function reset_forgejo() {
|
||||
|
@ -96,7 +100,7 @@ function reset_forgejo() {
|
|||
local work_path=$DIR/forgejo-work-path
|
||||
rm -fr $work_path
|
||||
mkdir -p $work_path
|
||||
WORK_PATH=$work_path envsubst < $SELF_DIR/$config-app.ini > $work_path/app.ini
|
||||
IP=$(myip) WORK_PATH=$work_path envsubst < $SELF_DIR/$config-app.ini > $work_path/app.ini
|
||||
}
|
||||
|
||||
function teardown() {
|
||||
|
|
Loading…
Reference in a new issue