We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
env:
1 parent a56d450 commit 934655bCopy full SHA for 934655b
README.md
@@ -294,3 +294,25 @@ jobs:
294
295
console.log(stdout)
296
```
297
+
298
+### Use env as input
299
300
+You can set env vars to use them in your script:
301
302
+```yaml
303
+on: push
304
305
+jobs:
306
+ echo-input:
307
+ runs-on: ubuntu-latest
308
+ steps:
309
+ - uses: actions/github-script@v3
310
+ env:
311
+ FIRST_NAME: Mona
312
+ LAST_NAME: Octocat
313
+ with:
314
+ script: |
315
+ const { FIRST_NAME, LAST_NAME } = process.env
316
317
+ console.log(`Hello ${FIRST_NAME} ${LAST_NAME}`)
318
+```
0 commit comments