From 696f714e275e3f41f2d80b6527c72f9df1643351 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 11 Apr 2023 13:40:17 +0800 Subject: [PATCH] feat: refactor deployment workflows and update base image in Dockerfile - Rename a workflow job from `deploy artifact` to `test deploy artifact` - Add a new workflow job for copying files to a server - Update the base image in Dockerfile to `ghcr.io/appleboy/drone-scp:latest` Signed-off-by: Bo-Yi Wu --- .github/workflows/ci.yml | 19 ++++++++++++++++++- Dockerfile | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 516a8ab..2ddc591 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: target: "test" deploy: - name: deploy artifact + name: test deploy artifact runs-on: ubuntu-latest steps: - name: checkout @@ -137,3 +137,20 @@ jobs: port: ${{ secrets.PORT }} source: ${{ steps.changed-files.outputs.all_changed_files }} target: test + + target: + name: test target folder + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: copy file to server + uses: ./ + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + source: tests/a.txt,tests/b.txt + target: test foobar diff --git a/Dockerfile b/Dockerfile index 9328506..df10097 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/appleboy/drone-scp:1.6.7 +FROM ghcr.io/appleboy/drone-scp:latest COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh