From 579d09787e717dacfd533fcc57ca7d3ec92155de Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 25 Mar 2023 22:53:12 +0100 Subject: [PATCH] add parameters --- action.yml | 28 ++++++++++++++++++++-------- testdata/try-setup-forgejo.yml | 6 +++++- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 7cf92e5..792778f 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/testdata/try-setup-forgejo.yml b/testdata/try-setup-forgejo.yml index edf3183..a7b67a0 100644 --- a/testdata/try-setup-forgejo.yml +++ b/testdata/try-setup-forgejo.yml @@ -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