From 4241e607069a4b0fedb93ad83856d1a76c093b11 Mon Sep 17 00:00:00 2001 From: appleboy Date: Tue, 24 Dec 2024 22:06:36 +0800 Subject: [PATCH] docs: improve documentation and testing configurations - Add example for using environment variables with `scp-action` in README.md Signed-off-by: appleboy --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 2d9b55c..42c74e6 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,20 @@ Copy file via a SSH password: target: your_server_target_folder_path ``` +Using the environment variables + +```yaml +- name: copy file via ssh password + uses: appleboy/scp-action@v0.1.7 + with: + host: ${{ env.HOST }} + username: ${{ env.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ env.PORT }} + source: "tests/a.txt,tests/b.txt" + target: ${{ env.TARGET_PATH }} +``` + Copy file via a SSH key: ```yaml