mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-23 19:51:03 -05:00
implement install-only
This commit is contained in:
parent
a580cb63b6
commit
434114e8f1
2 changed files with 8 additions and 0 deletions
|
@ -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 -->
|
||||
|
||||
|
||||
|
|
|
@ -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/
|
||||
|
|
Loading…
Reference in a new issue