mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2024-11-19 08:08:05 +08:00
[action] get input vars from ENV or WITH workflow settings
This commit is contained in:
11
src/inputs.js
Normal file
11
src/inputs.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const inputNames = ['REMOTE_HOST', 'REMOTE_USER', 'REMOTE_PORT', 'SSH_PRIVATE_KEY', 'DEPLOY_KEY_NAME', 'SOURCE', 'TARGET', 'ARGS'];
|
||||
|
||||
const inputs = {
|
||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE
|
||||
};
|
||||
// Get inputs from ENV or WITH workflow settings
|
||||
inputNames.forEach((input) => {
|
||||
inputs[input] = process.env[input] || process.env[`INPUT_${input}`];
|
||||
});
|
||||
|
||||
module.exports = inputs;
|
||||
Reference in New Issue
Block a user