add parameters

This commit is contained in:
Earl Warren 2023-03-25 22:53:12 +01:00
parent 9279b526cd
commit 579d09787e
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 25 additions and 9 deletions

View file

@ -1,20 +1,32 @@
name: 'Setup Forgejo'
author: 'Forgejo authors'
description: 'Setup Forgejo and a runner'
inputs:
forgejo-image: # id of input
description: 'Forgejo image'
default: 'codeberg.org/forgejo/forgejo:v1.19'
image:
description: 'Container image'
default: 'codeberg.org/forgejo/forgejo'
image-version:
description: 'Container image version'
default: '1.19'
runner:
description: 'Runner git repository'
default: 'https://code.forgejo.org/fogejo/runner'
runner-version:
description: 'Runner version'
default: 'v1.4.1'
outputs:
random-number:
description: "Token"
value: "token"
url:
description: "URL"
value: ${{ steps.forgejo.outputs.url }}"
runs:
using: "composite"
steps:
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: |
- id: forgejo
run: |
dependencies.sh
forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo:1.19
forgejo.sh setup root admin1234 ${{ inputs.image }}:${{ inputs.image-version }}
forgejo-runner.sh setup
echo url="http://$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
shell: bash

View file

@ -6,4 +6,8 @@ jobs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: SELF/setup-forgejo@vTest
- id: forgejo
uses: SELF/setup-forgejo@vTest
- run:
set -ex
echo ${{ steps.forgejo.outputs.url }} | grep :3000