From 4ab85431200001891797a7c446f7faf15e8d8026 Mon Sep 17 00:00:00 2001 From: "Bo-Yi.Wu" Date: Sun, 16 Apr 2023 11:34:29 +0800 Subject: [PATCH] ci: refactor CI workflow to support multiple hosts - Remove `1.6.8` version from the `FROM` instruction in the Dockerfile - Add a new job to copy files to multiple hosts in the CI workflow Signed-off-by: Bo-Yi.Wu --- .github/workflows/ci.yml | 17 +++++++++++++++++ Dockerfile | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8658a7..8c9f5df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,3 +154,20 @@ jobs: port: ${{ secrets.PORT }} source: tests/a.txt,tests/b.txt target: test foobar + + multipleHost: + name: test Multiple Host + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: copy file to server + uses: ./ + with: + host: ${{ secrets.HOST }}:${{ secrets.PORT }},${{ secrets.HOST }}:${{ secrets.PORT }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: 1024 + source: tests/a.txt,tests/b.txt + target: foobar diff --git a/Dockerfile b/Dockerfile index 57a9ad6..b74fceb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/appleboy/drone-scp:1.6.8 +FROM ghcr.io/appleboy/drone-scp COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh