print vars
parent
a52870b487
commit
4efe6b6c40
|
@ -16,10 +16,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set ENV var
|
|
||||||
run: |
|
|
||||||
echo "CUSTOM_VAR=IT WORKS" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Clean up old test files
|
- name: Clean up old test files
|
||||||
run: |
|
run: |
|
||||||
docker stop ssh-host-container || true && docker rm ssh-host-container || true
|
docker stop ssh-host-container || true && docker rm ssh-host-container || true
|
||||||
|
@ -61,13 +57,13 @@ jobs:
|
||||||
- name: e2e Test ssh
|
- name: e2e Test ssh
|
||||||
run: |
|
run: |
|
||||||
echo "$TEST_USER@$REMOTE_HOST"
|
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
|
- name: e2e Test published ssh-deploy action
|
||||||
uses: easingthemes/ssh-deploy@feature/add-tests
|
uses: easingthemes/ssh-deploy@feature/add-tests
|
||||||
env:
|
env:
|
||||||
# SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY
|
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||||
# REMOTE_HOST: $REMOTE_HOST
|
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST1
|
||||||
REMOTE_USER: ${{ env.TEST_USER }}
|
REMOTE_USER: ${{ env.TEST_USER }}
|
||||||
ARGS: "-rltgoDzvO"
|
ARGS: "-rltgoDzvO"
|
||||||
SOURCE: "test_project/"
|
SOURCE: "test_project/"
|
||||||
|
|
|
@ -18,6 +18,9 @@ const defaultOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('[general] GITHUB_WORKSPACE: ', GITHUB_WORKSPACE);
|
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 sshDeploy = (() => {
|
||||||
const rsync = ({ privateKey, port, src, dest, args, exclude }) => {
|
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 = {
|
const inputs = {
|
||||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE
|
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) => {
|
inputNames.forEach((input) => {
|
||||||
inputs[input] = process.env[input] || process.env[`INPUT_${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('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_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