Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ jobs:
test:
runs-on: ubuntu-latest
env:
node_version: 18.4.0
expected: |-
here is some "text". this is not a newline: [\n]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dynamic Use
uses: ./../dynamic-uses
id: setup_node
uses: ./.
id: parrot
with:
uses: "${{ 'actions/setup-node@v3' }}"
with: '{ "node-version": "${{ env.node_version }}" }'
uses: ./.github/workflows/test
with: |
{ "echo": ${{ toJSON(env.expected) }} }
- name: Validate outputs
env:
actual: ${{ fromJSON(steps.parrot.outputs.outputs).echo }}
run: |
expected="v${node_version}"
actual="${{ fromJSON(steps.setup_node.outputs.outputs)['node-version'] }}"
if [[ "$expected" != "$actual" ]]; then
echo "::error::output mismatch! expected=$expected, actual=$actual"
exit 1
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: echo action
description: return the input as an output
inputs:
echo:
description: what should i say?
required: true
outputs:
echo:
description: what i said
value: ${{ inputs.echo }}
runs:
using: composite
steps:
- env:
echo: ${{ inputs.echo }}
run: echo "$echo"
shell: bash