BREAKING CHANGE: Update inputs for multi src and pattern args

This commit is contained in:
Dragan Filipovic 2023-01-02 23:50:02 +01:00
parent bfa025c10c
commit 98ee38d52e
3 changed files with 9 additions and 7 deletions

View File

@ -2,7 +2,7 @@ name: e2e Test
on: on:
push: push:
branches: [ 'main' ] branches: [ 'feature/multi-src' ]
workflow_dispatch: workflow_dispatch:
inputs: inputs:
ARGS: ARGS:
@ -63,6 +63,9 @@ jobs:
- name: Create project file - name: Create project file
run: | run: |
mkdir test_project2 && cd "$_"
truncate -s 5MB info2.txt
cd ../
mkdir test_project && cd "$_" mkdir test_project && cd "$_"
touch index.html touch index.html
date +"%Y-%m-%d %H:%M:%S,%3N" >> index.html date +"%Y-%m-%d %H:%M:%S,%3N" >> index.html
@ -77,7 +80,7 @@ jobs:
echo "skip_dir:" && ls -l skip_dir echo "skip_dir:" && ls -l skip_dir
- name: e2e Test published ssh-deploy action - name: e2e Test published ssh-deploy action
uses: easingthemes/ssh-deploy@main uses: easingthemes/ssh-deploy@feature/multi-src
env: env:
# ENV Vars created in previous steps: # ENV Vars created in previous steps:
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY # SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
@ -85,7 +88,7 @@ jobs:
REMOTE_USER: ${{ env.TEST_USER }} REMOTE_USER: ${{ env.TEST_USER }}
ARGS: ${{ github.event.inputs.ARGS || '-rltgoDzvO --delete --chmod=ugo=rwX --progress' }} ARGS: ${{ github.event.inputs.ARGS || '-rltgoDzvO --delete --chmod=ugo=rwX --progress' }}
SSH_CMD_ARGS: ${{ github.event.inputs.SSH_CMD_ARGS || '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null' }} SSH_CMD_ARGS: ${{ github.event.inputs.SSH_CMD_ARGS || '-o StrictHostKeyChecking=no, -o UserKnownHostsFile=/dev/null' }}
SOURCE: "test_project/" SOURCE: ["test_project/, test_project2/"]
TARGET: "/var/www/html/" TARGET: "/var/www/html/"
EXCLUDE: ${{ github.event.inputs.EXCLUDE || 'skip_dir/, /node_modules/' }} EXCLUDE: ${{ github.event.inputs.EXCLUDE || 'skip_dir/, /node_modules/' }}
SCRIPT_BEFORE: | SCRIPT_BEFORE: |

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -29,11 +29,10 @@ inputNames.forEach((input) => {
let extendedVal = validVal; let extendedVal = validVal;
// eslint-disable-next-line default-case // eslint-disable-next-line default-case
switch (inputName) { switch (inputName) {
case 'source': case 'args':
extendedVal = `${githubWorkspace}/${validVal}`; extendedVal = validVal.split(' ');
break; break;
case 'exclude': case 'exclude':
case 'args':
case 'sshCmdArgs': case 'sshCmdArgs':
extendedVal = validVal.split(',').map((item) => item.trim()); extendedVal = validVal.split(',').map((item) => item.trim());
break; break;