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' name: 'Setup Forgejo'
author: 'Forgejo authors'
description: 'Setup Forgejo and a runner' description: 'Setup Forgejo and a runner'
inputs: inputs:
forgejo-image: # id of input image:
description: 'Forgejo image' description: 'Container image'
default: 'codeberg.org/forgejo/forgejo:v1.19' 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: outputs:
random-number: url:
description: "Token" description: "URL"
value: "token" value: ${{ steps.forgejo.outputs.url }}"
runs: runs:
using: "composite" using: "composite"
steps: steps:
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH - run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash shell: bash
- run: | - id: forgejo
run: |
dependencies.sh 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 forgejo-runner.sh setup
echo url="http://$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
shell: bash shell: bash

View file

@ -6,4 +6,8 @@ jobs:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
- uses: actions/checkout@v3 - 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