Skip to content

Commit

Permalink
Document preference for separate shell scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry committed Jun 12, 2024
1 parent 4278510 commit fd58bbd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,24 @@ To do this:
with:
some-input: some-value
```
### Use separate files for shell scripts so they're linted
Instead of embedding a shell script in the `run` string, write a separate script and refer to that.

For example, don't use the step:

```yaml
id: echo-success
shell: bash
run: |
echo "Success!"
```

Instead, create the file `echo-success.bash` in the same directory and use the step:

```yaml
id: echo-success
shell: bash
run: ./echo-success.bash
```

0 comments on commit fd58bbd

Please sign in to comment.