From 434114e8f1408465228efef55ab044fec2023cb6 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 28 Oct 2023 23:47:47 +0200 Subject: [PATCH] implement install-only --- README.md | 1 + action.yml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 307be22..64f9dcd 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ It can only be run on the `self-hosted` platform, running on a host with LXC ins | runner-version | Runner version | `false` | v3.0.1 | | container | Name of the container running the Forgejo instance | `false` | forgejo | | lxc-ip-prefix | Class C IP prefix used by LXC | `false` | 10.0.23 | +| install-only | Only install Forgejo and the Forgejo runner, do not launch them | `false` | false | diff --git a/action.yml b/action.yml index 7e2ef51..048ce1d 100644 --- a/action.yml +++ b/action.yml @@ -53,6 +53,9 @@ inputs: lxc-ip-prefix: description: 'Class C IP prefix used by LXC' default: '10.0.23' + install-only: + description: 'Only install Forgejo and the Forgejo runner, do not launch them' + default: 'false' outputs: url: description: "URL of the Forgejo instance" @@ -81,6 +84,10 @@ runs: cd $(mktemp -d) cp ${{ github.action_path }}/runner-config.yaml . LXC_IP_PREFIX=${{ inputs.lxc-ip-prefix }} forgejo-dependencies.sh + if ${{ inputs.install-only }} ; then + echo "install-only is true, do not run Forgejo" + exit 0 + fi export CONTAINER=${{ inputs.container }} forgejo.sh setup ${{ inputs.user }} "${{ inputs.password }}" ${{ inputs.image }} ${{ inputs.image-version }} forgejo-runner.sh setup ${{ inputs.runner }} ${{ inputs.runner-version }} http://$(cat forgejo-ip):3000/