add host-port to the output

This commit is contained in:
Earl Warren 2023-03-27 16:43:26 +02:00
parent aefd5f2538
commit e6bb54498c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 11 additions and 2 deletions

View file

@ -28,6 +28,7 @@ It can only be run on the `self-hosted` platform, running on a host with LXC ins
| parameter | description | | parameter | description |
| --- | --- | | --- | --- |
| url | URL | | url | URL |
| host-port | Host and port, e.g 172.0.17.2:3000 |
| token | Application token | | token | Application token |
<!-- action-docs-outputs --> <!-- action-docs-outputs -->
@ -49,3 +50,7 @@ jobs:
curl ${{ steps.forgejo.outputs.url }}/api/forgejo/v1/version | grep 1.19 curl ${{ steps.forgejo.outputs.url }}/api/forgejo/v1/version | grep 1.19
``` ```
## Hacking
* Update the README from the action file with https://github.com/npalm/action-docs `action-docs --update-readme`

View file

@ -23,10 +23,13 @@ inputs:
outputs: outputs:
url: url:
description: "URL" description: "URL"
value: ${{ steps.forgejo.outputs.url }}" value: "${{ steps.forgejo.outputs.url }}"
host-port:
description: "Host and port, e.g 172.0.17.2:3000"
value: "${{ steps.forgejo.outputs.host-port }}"
token: token:
description: "Application token" description: "Application token"
value: ${{ steps.forgejo.outputs.token }}" value: "${{ steps.forgejo.outputs.token }}"
runs: runs:
using: "composite" using: "composite"
steps: steps:
@ -39,5 +42,6 @@ runs:
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 forgejo-runner.sh setup
echo url="http://$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT echo url="http://$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
echo host-port="$(cat forgejo-ip):3000" >> $GITHUB_OUTPUT
echo token=$(cat forgejo-token) >> $GITHUB_OUTPUT echo token=$(cat forgejo-token) >> $GITHUB_OUTPUT
shell: bash shell: bash