mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-11-13 22:38:04 +00:00
print vars
This commit is contained in:
parent
a52870b487
commit
4efe6b6c40
10
.github/workflows/e2e.yml
vendored
10
.github/workflows/e2e.yml
vendored
@ -16,10 +16,6 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set ENV var
|
||||
run: |
|
||||
echo "CUSTOM_VAR=IT WORKS" >> $GITHUB_ENV
|
||||
|
||||
- name: Clean up old test files
|
||||
run: |
|
||||
docker stop ssh-host-container || true && docker rm ssh-host-container || true
|
||||
@ -61,13 +57,13 @@ jobs:
|
||||
- name: e2e Test ssh
|
||||
run: |
|
||||
echo "$TEST_USER@$REMOTE_HOST"
|
||||
ssh -p 8822 $TEST_USER@$REMOTE_HOST 'exit'
|
||||
# ssh -p 8822 $TEST_USER@$REMOTE_HOST 'exit'
|
||||
|
||||
- name: e2e Test published ssh-deploy action
|
||||
uses: easingthemes/ssh-deploy@feature/add-tests
|
||||
env:
|
||||
# SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY
|
||||
# REMOTE_HOST: $REMOTE_HOST
|
||||
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST1
|
||||
REMOTE_USER: ${{ env.TEST_USER }}
|
||||
ARGS: "-rltgoDzvO"
|
||||
SOURCE: "test_project/"
|
||||
|
@ -18,6 +18,9 @@ const defaultOptions = {
|
||||
};
|
||||
|
||||
console.log('[general] GITHUB_WORKSPACE: ', GITHUB_WORKSPACE);
|
||||
console.log('REMOTE_HOST: ', process.env.REMOTE_HOST);
|
||||
console.log('REMOTE_USER: ', process.env.REMOTE_USER);
|
||||
console.log('SSH_PRIVATE_KEY: ', process.env.SSH_PRIVATE_KEY);
|
||||
|
||||
const sshDeploy = (() => {
|
||||
const rsync = ({ privateKey, port, src, dest, args, exclude }) => {
|
||||
|
@ -3,9 +3,6 @@ const inputNames = ['REMOTE_HOST', 'REMOTE_USER', 'REMOTE_PORT', 'SSH_PRIVATE_KE
|
||||
const inputs = {
|
||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE
|
||||
};
|
||||
// Get inputs from ENV or WITH workflow settings
|
||||
console.log('EXAMPLE_REMOTE_HOST: ', process.env.EXAMPLE_REMOTE_HOST);
|
||||
console.log('REMOTE_HOST: ', process.env.REMOTE_HOST);
|
||||
|
||||
inputNames.forEach((input) => {
|
||||
inputs[input] = process.env[input] || process.env[`INPUT_${input}`];
|
||||
|
12
src/test.js
12
src/test.js
@ -1,3 +1,13 @@
|
||||
console.log('||||||||||||||||||||||||||||||||||||||');
|
||||
console.log('EXAMPLE_REMOTE_HOST: ', process.env.EXAMPLE_REMOTE_HOST);
|
||||
console.log('REMOTE_HOST: ', process.env.REMOTE_HOST);
|
||||
console.log('EXAMPLE_REMOTE_USER: ', process.env.EXAMPLE_REMOTE_USER);
|
||||
console.log('EXAMPLE_SSH_PRIVATE_KEY: ', process.env.EXAMPLE_SSH_PRIVATE_KEY);
|
||||
console.log('||||||||||||||||||||||||||||||||||||||');
|
||||
console.log('EXAMPLE_REMOTE_HOST1: ', process.env.EXAMPLE_REMOTE_HOST1);
|
||||
console.log('EXAMPLE_REMOTE_USER1: ', process.env.EXAMPLE_REMOTE_USER1);
|
||||
console.log('EXAMPLE_SSH_PRIVATE_KEY1: ', process.env.EXAMPLE_SSH_PRIVATE_KEY1);
|
||||
console.log('||||||||||||||||||||||||||||||||||||||');
|
||||
console.log('REMOTE_USER: ', process.env.REMOTE_USER);
|
||||
console.log('REMOTE_HOST: ', process.env.REMOTE_HOST);
|
||||
console.log('SSH_PRIVATE_KEY: ', process.env.SSH_PRIVATE_KEY);
|
||||
console.log('||||||||||||||||||||||||||||||||||||||');
|
||||
|
Loading…
Reference in New Issue
Block a user