docs: add Pass environment variable to shell script

master
Bo-Yi Wu 5 years ago
parent 480ff5e05e
commit ef697c0ac1

@ -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"
```

Loading…
Cancel
Save