a8e05cded6
* feat: allow to spawn and run a local reusable workflow This change contains the ability to parse/plan/run a local reusable workflow. There are still numerous things missing: - inputs - secrets - outputs * feat: add workflow_call inputs * test: improve inputs test * feat: add input defaults * feat: allow expressions in inputs * feat: use context specific expression evaluator * refactor: prepare for better re-usability * feat: add secrets for reusable workflows * test: use secrets during test run * feat: handle reusable workflow outputs Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
name: local-reusable-workflows
|
|
on: pull_request
|
|
|
|
jobs:
|
|
reusable-workflow:
|
|
uses: ./.github/workflows/local-reusable-workflow.yml
|
|
with:
|
|
string_required: string
|
|
bool_required: ${{ true }}
|
|
number_required: 1
|
|
secrets:
|
|
secret: keep_it_private
|
|
|
|
reusable-workflow-with-inherited-secrets:
|
|
uses: ./.github/workflows/local-reusable-workflow.yml
|
|
with:
|
|
string_required: string
|
|
bool_required: ${{ true }}
|
|
number_required: 1
|
|
secrets: inherit
|
|
|
|
output-test:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- reusable-workflow
|
|
- reusable-workflow-with-inherited-secrets
|
|
steps:
|
|
- name: output with secrets map
|
|
run: |
|
|
echo reusable-workflow.output=${{ needs.reusable-workflow.outputs.output }}
|
|
[[ "${{ needs.reusable-workflow.outputs.output == 'string' }}" = "true" ]] || exit 1
|
|
|
|
- name: output with inherited secrets
|
|
run: |
|
|
echo reusable-workflow-with-inherited-secrets.output=${{ needs.reusable-workflow-with-inherited-secrets.outputs.output }}
|
|
[[ "${{ needs.reusable-workflow-with-inherited-secrets.outputs.output == 'string' }}" = "true" ]] || exit 1
|