ci: refactor CI workflow to support multiple hosts (#115)

- Add a new job to copy files to multiple hosts in the CI workflow

fix https://github.com/appleboy/scp-action/issues/98
This commit is contained in:
Bo-Yi Wu 2023-04-16 11:44:14 +08:00 committed by GitHub
parent 82ebdbe3ed
commit 952a6e3250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -154,3 +154,20 @@ jobs:
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
source: tests/a.txt,tests/b.txt source: tests/a.txt,tests/b.txt
target: test foobar 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

View File

@ -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 COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh