From ef697c0ac1fdd4e7e0713bf898c25c5035cdc9a5 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 29 Sep 2019 11:23:40 +0800 Subject: [PATCH] docs: add Pass environment variable to shell script --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index a96cb89..813d768 100644 --- a/README.md +++ b/README.md @@ -109,3 +109,21 @@ Multiple Hosts whoami ls -al ``` + +Pass environment variable to shell script + +```diff +- name: pass environment + uses: appleboy/ssh-action@master ++ env: ++ FOO: "BAR" + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} ++ envs: FOO + script: | + echo "I am $FOO" + echo "I am $BAR" +```