diff --git a/README.md b/README.md index c315404..26f0230 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ # Required. dep: deploy + # Option to skip over the SSH setup/configuration + # Self hosted runners don't need the SSH configuration or the SSH agent to be started + self-hosted: false + # Private key for connecting to remote hosts. To generate private key: # `ssh-keygen -o -t rsa -C 'action@deployer.org'`. # Optional. diff --git a/action.yaml b/action.yaml index 4b04cc0..fe581bb 100644 --- a/action.yaml +++ b/action.yaml @@ -8,6 +8,11 @@ inputs: required: true description: The command. + self-hosted: + required: false + default: 'false' + description: Whether the action is running on a self-hosted runner. + private-key: required: false default: '' diff --git a/index.js b/index.js index d75e719..a3f24fb 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,10 @@ void async function main() { }() async function ssh() { + if (core.getBooleanInput('self-hosted')) { + return; + } + let sshHomeDir = `${process.env['HOME']}/.ssh` if (!fs.existsSync(sshHomeDir)) {