appleboy / appleboy/scp-action
scp-action doesn't respect default working-directory
- Dominant language
- Shell
- Stars
- 1.6k
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Config:
```yml
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: scraper
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '15.14.0'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
- name: Build Artifacts
run: npm run start
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: "scraper/dist"
target: "path/to/target"
use_insecure_cipher: true
```
To be clear, the above config is _working_, but I have to enter `scraper` in as the source when I would expect the command to be executed from within that directory because of `jobs..defaults.run.working-directory`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the scp-action entry point and checking how the action receives or handles GitHub Actions' defaults.run.working-directory setting. Reproduce the workflow shown in the issue, then confirm that the source path is resolved from the configured working directory without requiring its directory name to be repeated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100