From 6e11898ea2dda150e2bd9c58b2428e8e42f59cc6 Mon Sep 17 00:00:00 2001 From: Tavi Nolan Date: Thu, 6 Jun 2024 14:56:30 +0100 Subject: [PATCH] Updating template input documentation Signed-off-by: Tavi Nolan --- .../software-templates/input-examples.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/features/software-templates/input-examples.md b/docs/features/software-templates/input-examples.md index a95cee24f4..32d37ae17c 100644 --- a/docs/features/software-templates/input-examples.md +++ b/docs/features/software-templates/input-examples.md @@ -238,3 +238,51 @@ spec: input: url: ${{ parameters.path if parameters.path else '/root' }} ``` + +## Use placeholders to reference remote files + +#### Note: testing of this functionality is not yet supported using _create/edit_ + +### template.yaml + +```yaml +spec: + parameters: + - $yaml: https://github.com/example/path/to/example.yaml + - title: Fill in some steps + properties: + path: + title: path + type: string + + steps: + - $yaml: https://github.com//example/path/to/action.yaml + + - id: fetch + name: Fetch template + action: fetch:template + input: + url: ${{ parameters.path if parameters.path else '/root' }} +``` + +### example.yaml + +```yaml +title: Provide simple information +required: + - url +properties: + url: + title: url + type: string +``` + +### action.yaml + +```yaml +id: publish +name: Publish files +action: publish:github +input: + repoUrl: ${{ parameters.url }} +```