mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-24 00:50:56 -05:00
Merge pull request 'add example file illustrating local-action' (#31) from dachary/setup-forgejo:wip-local into main
Reviewed-on: https://code.forgejo.org/actions/setup-forgejo/pulls/31 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
commit
8f3dac79d7
3 changed files with 28 additions and 1 deletions
|
@ -10,7 +10,7 @@ jobs:
|
||||||
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.19
|
./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.19
|
||||||
./forgejo-runner.sh setup
|
./forgejo-runner.sh setup
|
||||||
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
||||||
for example in echo container expression ; do
|
for example in echo container expression local-action ; do
|
||||||
echo "============================ example-$example ==================="
|
echo "============================ example-$example ==================="
|
||||||
./forgejo-test-helper.sh run_workflow testdata/example-$example http://root:admin1234@$(cat forgejo-ip):3000 root example-$example setup-forgejo $(cat forgejo-token)
|
./forgejo-test-helper.sh run_workflow testdata/example-$example http://root:admin1234@$(cat forgejo-ip):3000 root example-$example setup-forgejo $(cat forgejo-token)
|
||||||
done
|
done
|
||||||
|
|
16
testdata/example-local-action/.forgejo/local-action/action.yml
vendored
Normal file
16
testdata/example-local-action/.forgejo/local-action/action.yml
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
inputs:
|
||||||
|
input-one:
|
||||||
|
default: 'one'
|
||||||
|
description: 'description one'
|
||||||
|
input-two-required:
|
||||||
|
description: 'description two'
|
||||||
|
required: true
|
||||||
|
outputs:
|
||||||
|
key:
|
||||||
|
description: 'output value'
|
||||||
|
value: "${{ steps.one.outputs.key }}"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- run: echo key=${{ inputs.input-two-required }} >> $GITHUB_OUTPUT
|
11
testdata/example-local-action/.forgejo/workflows/test.yml
vendored
Normal file
11
testdata/example-local-action/.forgejo/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
ls:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- id: local-action
|
||||||
|
uses: ./.forgejo/local-action
|
||||||
|
with:
|
||||||
|
input-two-required: "two"
|
||||||
|
- run: test "${{ steps.local-action.outputs.key }}" = "two"
|
Loading…
Reference in a new issue