1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2024-09-19 09:56:16 +00:00

implement install-only

This commit is contained in:
Earl Warren 2023-10-28 23:47:47 +02:00
parent a580cb63b6
commit 434114e8f1
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 8 additions and 0 deletions

View file

@ -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 |
<!-- action-docs-inputs -->

View file

@ -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/