actions: add trivial needs output example (#915)
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/915 Reviewed-by: Gusted <gusted@noreply.code.forgejo.org> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
15cfe2f55c
commit
20f170d4a0
2 changed files with 20 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ function test_actions() {
|
|||
done
|
||||
fi
|
||||
|
||||
for example in echo matrix workflow-call lxc config-options cache checkout service container expression local-action docker-action if if-fail push tag push-cancel artifacts pull-request context; do
|
||||
for example in echo matrix needs workflow-call lxc config-options cache checkout service container expression local-action docker-action if if-fail push tag push-cancel artifacts pull-request context; do
|
||||
run actions_verify_example $example
|
||||
done
|
||||
|
||||
|
|
|
|||
19
actions/example-needs/.forgejo/workflows/test.yml
Normal file
19
actions/example-needs/.forgejo/workflows/test.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
job1:
|
||||
runs-on: docker
|
||||
outputs:
|
||||
job1output: ${{ steps.step1.outputs.value }}
|
||||
steps:
|
||||
- id: step1
|
||||
run: |
|
||||
set -x
|
||||
echo "value=value1" >> $FORGEJO_OUTPUT
|
||||
|
||||
job2:
|
||||
needs: [job1]
|
||||
runs-on: docker
|
||||
steps:
|
||||
- run: |
|
||||
set -x
|
||||
test "${{ needs.job1.outputs.job1output }}" = "value1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue