Question about Remove the Specified Number of Leading Path Elements
paigeman opened this issue · comments
as described in README.md:
- name: remove the specified number of leading path elements
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "tests/a.txt,tests/b.txt"
target: your_server_target_folder_path
strip_components: 1
code above can remove the specified number of leading path element.
However, it seems there is no solution when sources come from different directories. For example:
- name: remove the specified number of leading path elements
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
source: "tests/a.txt,testa/bbd/b.txt"
target: your_server_target_folder_path
strip_components: 1
I think it might be easy to support by passing numbers splitted by comma in strip_components option.