Add support for composite actions (#514)
* Add support for composite actions * Fix to make more complex composite actions work * Fix to make more complex composite actions work * Let's validate the steps in the composite steps to fail on uses and run's without shell, like the real world * Add support for composite actions * Add workflow to test composite actions * Log instead of panicing when output is mismatched * Merge maps so environment variables are not lost * Remove Debug * Correect merge error * Remove invalid composite tests. * Fix composite test Co-authored-by: Casey Lee <cplee@nektos.com> Co-authored-by: monkers <mikem@msquaredconsulting.co.uk> Co-authored-by: Mike Moncrieffe <69815687+mikemonkers@users.noreply.github.com>
This commit is contained in:
22
.github/actions/composite/action.yml
vendored
Normal file
22
.github/actions/composite/action.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: 'Test Composite Action'
|
||||
description: 'Test Composite Action'
|
||||
inputs:
|
||||
input:
|
||||
description: 'String to echo'
|
||||
required: true
|
||||
default: 'Hello World'
|
||||
outputs:
|
||||
output:
|
||||
description: 'Output string'
|
||||
value: ${{ steps.set-output.outputs.string }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: echo Hello ${{ inputs.input }}.
|
||||
shell: bash
|
||||
- id: set-output
|
||||
run: echo "::set-output name=string::output string"
|
||||
shell: bash
|
||||
- run: |
|
||||
${{ github.action_path }}/script.sh
|
||||
shell: bash
|
1
.github/actions/composite/script.sh
vendored
Executable file
1
.github/actions/composite/script.sh
vendored
Executable file
@@ -0,0 +1 @@
|
||||
echo "Output from script"
|
Reference in New Issue
Block a user