pass through the runner inputs

This commit is contained in:
Earl Warren 2023-03-27 19:39:19 +02:00
parent 0bc6cdef11
commit e9c25f1577
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 6 additions and 4 deletions

View file

@ -16,7 +16,7 @@ inputs:
default: 'admin1234'
runner:
description: 'Runner git repository'
default: 'https://code.forgejo.org/fogejo/runner'
default: 'https://code.forgejo.org/forgejo/runner'
runner-version:
description: 'Runner version'
default: 'v1.4.1'
@ -44,7 +44,7 @@ runs:
cd $(mktemp -d)
dependencies.sh
forgejo.sh setup ${{ inputs.user }} "${{ inputs.password }}" ${{ inputs.image }}:${{ inputs.image-version }}
forgejo-runner.sh setup
forgejo-runner.sh setup ${{ inputs.runner }} ${{ inputs.runner-version }} http://$(cat forgejo-ip):3000/
echo url="http://$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
echo host-port="$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
echo token=$(cat forgejo-token) >> $GITHUB_OUTPUT

View file

@ -41,12 +41,14 @@ function register() {
function run() {
./forgejo-runner/forgejo-runner daemon >& forgejo-runner.log &
echo $! > forgejo-runner-pid
sleep 1
cat forgejo-runner.log
}
function setup() {
local git="${1:-https://codeberg.org/forgejo/runner}"
local version="${1:-v1.4.1}"
local forgejo="${1:-http://$(cat forgejo-ip):3000/}"
local version="${2:-v1.4.1}"
local forgejo="${3:-http://$(cat forgejo-ip):3000/}"
dependencies
checkout $git