679cac1677
* test: add test case for #1319 * fix: setup of composite inputs This change fixes the composite action setup handling of inputs. All inputs are taken from the env now. The env is composed of the 'level above'. For example: - step env -> taken from run context - action env -> taken from step env - composite env -> taken from action env Before this change the env setup for steps, actions and composite run contexts was harder to understand as all parts looked into one of these: parent run context, step, action, composite run context. Now the 'data flow' is from higher levels to lower levels which should make it more clean. Fixes #1319 * test: add simple remote composite action test Since we don't have a remote composite test at all before this, we need at least the simplest case. This does not check every feature, but ensures basic availability of remote composite actions. * refactor: move ActionRef and ActionRepository Moving ActionRef and ActionRepository from RunContext into the step, allows us to remove the - more or less - ugly copy operations from the RunContext. This is more clean, as each step does hold the data required anyway and the RunContext shouldn't know about the action details. * refactor: remove unused properties
22 lines
592 B
YAML
22 lines
592 B
YAML
name: "composite"
|
|
description: "composite"
|
|
|
|
inputs:
|
|
composite-input:
|
|
description: "value"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: test input value
|
|
run: |
|
|
echo "input value 1=${{ inputs.composite-input }}"
|
|
[[ "${{ inputs.composite-input == 'value' }}" = "true" ]] || exit 1
|
|
shell: bash
|
|
- uses: nektos/act-test-actions/js@main
|
|
- name: test input value again
|
|
run: |
|
|
echo "input value 2=${{ inputs.composite-input }}"
|
|
[[ "${{ inputs.composite-input == 'value' }}" = "true" ]] || exit 1
|
|
shell: bash
|