mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 06:42:17 -05:00
add example file illustrating local-action
This commit is contained in:
parent
23e4bdbd6a
commit
16cd6fdca8
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-runner.sh setup
|
||||
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 ==================="
|
||||
./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
|
||||
|
|
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