Skip to content

Commit

Permalink
ci: refactor CI workflow to support multiple hosts (#115)
Browse files Browse the repository at this point in the history
- Add a new job to copy files to multiple hosts in the CI workflow

fix #98
  • Loading branch information
appleboy committed Apr 16, 2023
1 parent 82ebdbe commit 952a6e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/appleboy/drone-scp:1.6.8
FROM ghcr.io/appleboy/drone-scp:1.6.9

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down

0 comments on commit 952a6e3

Please sign in to comment.