setup-forgejo/action.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

2023-03-25 09:44:02 -04:00
name: 'Setup Forgejo'
2023-03-25 17:53:12 -04:00
author: 'Forgejo authors'
2023-03-25 09:44:02 -04:00
description: 'Setup Forgejo and a runner'
2023-03-24 10:59:04 -04:00
inputs:
2023-03-25 17:53:12 -04:00
image:
description: 'Container image'
default: 'codeberg.org/forgejo/forgejo'
image-version:
description: 'Container image version'
default: '1.19'
2023-03-25 18:15:29 -04:00
user:
description: 'Administrator user name'
default: 'root'
password:
description: 'Administrator password'
default: 'admin1234'
2023-03-25 17:53:12 -04:00
runner:
description: 'Runner git repository'
default: 'https://code.forgejo.org/fogejo/runner'
runner-version:
description: 'Runner version'
default: 'v1.4.1'
2023-03-24 10:59:04 -04:00
outputs:
2023-03-25 17:53:12 -04:00
url:
description: "URL"
value: ${{ steps.forgejo.outputs.url }}"
2023-03-25 18:15:29 -04:00
token:
description: "Application token"
value: ${{ steps.forgejo.outputs.token }}"
2023-03-24 10:59:04 -04:00
runs:
using: "composite"
steps:
2023-03-25 14:07:46 -04:00
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
2023-03-25 17:53:12 -04:00
- id: forgejo
run: |
cd $(mktemp -d)
2023-03-25 13:50:36 -04:00
dependencies.sh
2023-03-25 18:15:29 -04:00
forgejo.sh setup ${{ inputs.user }} "${{ inputs.password }}" ${{ inputs.image }}:${{ inputs.image-version }}
2023-03-25 13:50:36 -04:00
forgejo-runner.sh setup
2023-03-25 17:53:12 -04:00
echo url="http://$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
2023-03-25 18:15:29 -04:00
echo token=$(cat forgejo-token) >> $GITHUB_OUTPUT
2023-03-24 10:59:04 -04:00
shell: bash