appleboy / appleboy/scp-action
Question about Remove the Specified Number of Leading Path Elements
- Dominant language
- Shell
- Stars
- 1.6k
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with README.md's strip_components example and inspect the existing handling of that option. Verify the expected behavior when source files come from different directories and when multiple comma-separated values are supplied; done means the requested behavior is supported and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100