1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2025-03-15 14:44:38 +01:00

feat: add dir to outputs & do not checkout

- without it figuring out where it runs from is not easy
- do not call checkout

This is a breaking change for workflows that rely on this action for
the checkout
This commit is contained in:
Earl Warren 2025-01-23 13:56:55 +01:00
parent 7052de80f6
commit e2450fc1f8
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -65,6 +65,9 @@ inputs:
description: 'Only install Forgejo and the Forgejo runner, do not launch them' description: 'Only install Forgejo and the Forgejo runner, do not launch them'
default: 'false' default: 'false'
outputs: outputs:
dir:
description: "Directory from which Forgejo and the runner are launched and configured"
value: "${{ steps.forgejo.outputs.dir }}"
url: url:
description: "URL of the Forgejo instance" description: "URL of the Forgejo instance"
value: "${{ steps.forgejo.outputs.url }}" value: "${{ steps.forgejo.outputs.url }}"
@ -84,9 +87,6 @@ outputs:
runs: runs:
using: "composite" using: "composite"
steps: steps:
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- uses: actions/checkout@v4
- id: forgejo - id: forgejo
run: | run: |
cd $(mktemp -d) cd $(mktemp -d)
@ -111,4 +111,8 @@ runs:
echo token=$(cat forgejo-token) >> $GITHUB_OUTPUT echo token=$(cat forgejo-token) >> $GITHUB_OUTPUT
echo runner-logs="$(pwd)/forgejo-runner.log" >> $GITHUB_OUTPUT echo runner-logs="$(pwd)/forgejo-runner.log" >> $GITHUB_OUTPUT
echo runner-file="$(pwd)/.runner" >> $GITHUB_OUTPUT echo runner-file="$(pwd)/.runner" >> $GITHUB_OUTPUT
echo dir="$(pwd)" >> $GITHUB_OUTPUT
echo "$(pwd)" >> $GITHUB_PATH
echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash shell: bash