Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu 2023-04-09 18:08:07 +08:00
parent c2a7fc92f0
commit ec47354430

View File

@ -266,21 +266,16 @@ Only copy files that are newer than the corresponding destination files:
uses: tj-actions/changed-files@v35 uses: tj-actions/changed-files@v35
with: with:
since_last_remote_commit: true since_last_remote_commit: true
separator: ","
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- name: copy file to server - name: copy file to server
uses: ./ uses: appleboy/scp-action@master
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }} key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
source: ${{ join(steps.changed-files.outputs.all_changed_files, ',') }} source: ${{ steps.changed-files.outputs.all_changed_files }}
target: test target: test
``` ```