From fcb912273840412b2328c8434a7853b36e25d8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Juli=C3=A1n=20Merelo=20Guerv=C3=B3s?= Date: Thu, 7 Jan 2021 12:53:49 +0100 Subject: [PATCH 1/4] Add an example that helps use custom command And, at the same time, helps people find "perl" as a legit thing in Github Actions. --- .../reference/workflow-syntax-for-github-actions.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 2880ac819311..fd0ec6b34a71 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -688,7 +688,17 @@ steps: #### Custom shell -You can set the `shell` value to a template string using `command […options] {0} [..more_options]`. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at `{0}`. +You can set the `shell` value to a template string using `command […options] {0} [..more_options]`. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at `{0}`, as in this example + +```yaml +steps: + - name: Display the path + run: | + print %ENV + shell: perl {0} +``` + +The command needs to be installed in the environment, please check [the documentation on virtual environments](https://github.com/actions/virtual-environments) for the list of commands, languages and utilities available. #### Exit codes and error action preference From 19082c27f2ad51e2a911aae5e649f7acc2392780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Juli=C3=A1n=20Merelo=20Guerv=C3=B3s?= Date: Thu, 7 Jan 2021 13:05:09 +0100 Subject: [PATCH 2/4] Update to follow guidelines closer --- .../actions/reference/workflow-syntax-for-github-actions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index fd0ec6b34a71..937f02c2436b 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -688,17 +688,17 @@ steps: #### Custom shell -You can set the `shell` value to a template string using `command […options] {0} [..more_options]`. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at `{0}`, as in this example +You can set the `shell` value to a template string using `command […options] {0} [..more_options]`. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at `{0}`, as in this example: ```yaml steps: - - name: Display the path + - name: Display the environment variables and their values run: | print %ENV shell: perl {0} ``` -The command needs to be installed in the environment, please check [the documentation on virtual environments](https://github.com/actions/virtual-environments) for the list of commands, languages and utilities available. +The command used, `perl` in this case, needs to be installed in the environment, please check [the documentation on virtual environments](https://github.com/actions/virtual-environments) for the list of commands, languages and utilities available. #### Exit codes and error action preference From 869441740c1549ef93de774ca73106d855307a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Juli=C3=A1n=20Merelo=20Guerv=C3=B3s?= Date: Sat, 23 Jan 2021 09:03:35 +0100 Subject: [PATCH 3/4] Accept suggestion :+1: Co-authored-by: Sarah Edwards --- .../actions/reference/workflow-syntax-for-github-actions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 937f02c2436b..caa44cdd42a1 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -688,7 +688,9 @@ steps: #### Custom shell -You can set the `shell` value to a template string using `command […options] {0} [..more_options]`. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at `{0}`, as in this example: +You can set the `shell` value to a template string using `command […options] {0} [..more_options]`. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at `{0}`. + +For example: ```yaml steps: From 33eee7f2ebfafa5950705133f9dbffafa11410f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Juli=C3=A1n=20Merelo=20Guerv=C3=B3s?= Date: Sat, 23 Jan 2021 09:04:07 +0100 Subject: [PATCH 4/4] Accept this :+1: Co-authored-by: Sarah Edwards --- content/actions/reference/workflow-syntax-for-github-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index caa44cdd42a1..5e689fbf2e94 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -700,7 +700,7 @@ steps: shell: perl {0} ``` -The command used, `perl` in this case, needs to be installed in the environment, please check [the documentation on virtual environments](https://github.com/actions/virtual-environments) for the list of commands, languages and utilities available. +The command used, `perl` in this example, must be installed on the runner. For information about the software included on GitHub-hosted runners, see "[Specifications for GitHub-hosted runners](/actions/reference/specifications-for-github-hosted-runners#supported-software)." #### Exit codes and error action preference