Skip to content

Commit 79096d2

Browse files
mpdudeshaunco
andcommitted
Document how to pass input arguments during local development
Suggested by @shaunco in #38. Co-authored-by: Shaun Cooley <scooley@mapped.com>
1 parent 5fedeb5 commit 79096d2

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,24 @@ As a note to my future self, in order to work on this repo:
124124
* Clone it
125125
* Run `yarn install` to fetch dependencies
126126
* _hack hack hack_
127-
* `node index.js`. Inputs are passed through `INPUT_` env vars with their names uppercased. Use `env "INPUT_SSH-PRIVATE-KEY=\`cat file\`" node index.js` for this action.
127+
* `node index.js`. Inputs are passed through `INPUT_` env vars with their names uppercased.
128+
129+
On *nix use:
130+
```bash
131+
env "INPUT_SSH-PRIVATE-KEY=\`cat file\`" node index.js
132+
```
133+
134+
On Windows (cmd):
135+
```cmd
136+
set /P INPUT_SSH-PRIVATE-KEY=< file
137+
node index.js
138+
```
139+
140+
On Windows (PowerShell):
141+
```ps
142+
${env:INPUT_SSH-PRIVATE-KEY} = (Get-Content .\test-keys -Raw); node index.js
143+
node index.js
144+
```
128145
* Run `npm run build` to update `dist/*`, which holds the files actually run
129146
* Read https://help.github.com/en/articles/creating-a-javascript-action if unsure.
130147
* Maybe update the README example when publishing a new version.

0 commit comments

Comments
 (0)