mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-23 22:31:04 -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 |
|
| runner-version | Runner version | `false` | v3.0.1 |
|
||||||
| container | Name of the container running the Forgejo instance | `false` | forgejo |
|
| 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 |
|
| 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 -->
|
<!-- action-docs-inputs -->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,9 @@ inputs:
|
||||||
lxc-ip-prefix:
|
lxc-ip-prefix:
|
||||||
description: 'Class C IP prefix used by LXC'
|
description: 'Class C IP prefix used by LXC'
|
||||||
default: '10.0.23'
|
default: '10.0.23'
|
||||||
|
install-only:
|
||||||
|
description: 'Only install Forgejo and the Forgejo runner, do not launch them'
|
||||||
|
default: 'false'
|
||||||
outputs:
|
outputs:
|
||||||
url:
|
url:
|
||||||
description: "URL of the Forgejo instance"
|
description: "URL of the Forgejo instance"
|
||||||
|
@ -81,6 +84,10 @@ runs:
|
||||||
cd $(mktemp -d)
|
cd $(mktemp -d)
|
||||||
cp ${{ github.action_path }}/runner-config.yaml .
|
cp ${{ github.action_path }}/runner-config.yaml .
|
||||||
LXC_IP_PREFIX=${{ inputs.lxc-ip-prefix }} forgejo-dependencies.sh
|
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 }}
|
export CONTAINER=${{ inputs.container }}
|
||||||
forgejo.sh setup ${{ inputs.user }} "${{ inputs.password }}" ${{ inputs.image }} ${{ inputs.image-version }}
|
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/
|
forgejo-runner.sh setup ${{ inputs.runner }} ${{ inputs.runner-version }} http://$(cat forgejo-ip):3000/
|
||||||
|
|
Loading…
Reference in a new issue