No description
  • TypeScript 100%
Find a file
Jack Stockley 3a9c10302b
Some checks are pending
CI / lint (push) Waiting to run
CI / test-build (push) Waiting to run
CI / publish (push) Blocked by required conditions
Merge pull request #58 from jnstockley/dev
Update dependency @types/node to v24.13.0
2026-06-04 13:06:10 -05:00
.github/workflows Fix release error 2026-03-28 11:26:10 -05:00
src Log everything as stdOut 2026-01-30 22:24:48 -06:00
tests Revert "Cleanup" 2026-01-30 22:19:36 -06:00
.gitignore Initialize dev 2026-01-30 11:25:06 -06:00
.nvmrc Bump to latest lts version 2026-02-10 16:11:21 -07:00
action.yml Update node version 2026-03-11 22:11:36 -05:00
CODE_OF_CONDUCT.md Initialize dev 2026-01-30 11:25:06 -06:00
CONTRIBUTING.md Initialize dev 2026-01-30 11:25:06 -06:00
LICENSE Initialize dev 2026-01-30 11:25:06 -06:00
package-lock.json Update dependency @types/node to v24.13.0 2026-06-04 07:09:46 +00:00
package.json Update npm dependencies 2026-04-03 12:10:13 +00:00
README.md Implement SSH functionality 2026-01-30 11:38:41 -06:00
renovate.json Initialize dev 2026-01-30 11:25:06 -06:00
SECURITY.md Initialize dev 2026-01-30 11:25:06 -06:00
tsconfig.build.json Initialize dev 2026-01-30 11:25:06 -06:00
tsconfig.json Initialize dev 2026-01-30 11:25:06 -06:00

GitHub SSH Action

Run SSH commands against a remote host from GitHub Actions.

Usage

Password authentication

- name: Run SSH command
  uses: your-org/gh-ssh-action@v1
  with:
    host: ${{ secrets.SSH_HOST }}
    username: ${{ secrets.SSH_USER }}
    password: ${{ secrets.SSH_PASSWORD }}
    command: "uname -a"

Key authentication (with passphrase)

- name: Run SSH command
  uses: your-org/gh-ssh-action@v1
  with:
    host: ${{ secrets.SSH_HOST }}
    username: ${{ secrets.SSH_USER }}
    private_key: ${{ secrets.SSH_PRIVATE_KEY }}
    private_key_passphrase: ${{ secrets.SSH_PRIVATE_KEY_PASSPHRASE }}
    command: "uptime"

Multiple commands

- name: Run multiple SSH commands
  uses: your-org/gh-ssh-action@v1
  with:
    host: ${{ secrets.SSH_HOST }}
    username: ${{ secrets.SSH_USER }}
    private_key: ${{ secrets.SSH_PRIVATE_KEY }}
    command: |
      whoami
      pwd
      ls -la

Inputs

  • host: SSH host to connect to. Required.
  • username: SSH username. Required.
  • port: SSH port. Default: 22.
  • password: SSH password (for password auth).
  • private_key: SSH private key (for key auth). Use a multiline secret.
  • private_key_passphrase: Passphrase for the SSH private key.
  • command: Command to execute on the remote host. Required.

Outputs

  • stdout: Standard output from the remote command.
  • stderr: Standard error from the remote command.
  • exit_code: Exit code from the remote command.

Development

Requirements: Node.js 20+

npm install
npm test
npm run bundle
  • npm run bundle builds dist/index.js, which must be committed for GitHub Actions to run this action.
  • Update action.yml when you add inputs or outputs.

Release

  1. Run npm test and npm run bundle.
  2. Commit the changes, including dist/.
  3. Create and push a tag, for example v1.0.0.
  4. (Optional) Move a major tag like v1 to the new release.

License

ISC