mirror of
https://gitea.com/actions/appleboy-ssh-action.git
synced 2024-11-29 13:39:36 +01:00
docs: add Pass environment variable to shell script
This commit is contained in:
parent
480ff5e05e
commit
ef697c0ac1
1 changed files with 18 additions and 0 deletions
18
README.md
18
README.md
|
@ -109,3 +109,21 @@ Multiple Hosts
|
||||||
whoami
|
whoami
|
||||||
ls -al
|
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…
Reference in a new issue