-
-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: support running commands from a file (#341)
- Loading branch information
1 parent
ab698e5
commit 362a7f1
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ See [action.yml](./action.yml) for more detailed information. | |
| proxy_cipher | Allowed cipher algorithms for the proxy | | | ||
| proxy_use_insecure_cipher | Include more ciphers with use_insecure_cipher for the proxy | false | | ||
| script | Execute commands | | | ||
| script_file | Execute commands from a file | | | ||
| script_stop | Stop script after first failure | false | | ||
| envs | Pass environment variables to shell script | | | ||
| envs_format | Flexible configuration of environment value transfer | | | ||
|
@@ -222,6 +223,19 @@ ssh-keygen -t ed25519 -a 200 -C "[email protected]" | |
 | ||
#### Commands from a file | ||
```yaml | ||
- name: file commands | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
key: ${{ secrets.KEY }} | ||
port: ${{ secrets.PORT }} | ||
script_path: scripts/script.sh | ||
``` | ||
#### Multiple Hosts | ||
```diff | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
whoami |