google-github-actions/SSH to Google Cloud Platform compute instances
Use this action to connect to Google Cloud Platform instances via ssh and execute user's commands.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| instance_name | Name of the virtual machine instance to SSH into. | yes | — |
| zone | Zone of the instance to connect to. | yes | — |
| user | Specifies the username with which to SSH. If omitted, the user login name is used. If using OS Login, USER will be replaced by the OS Login user. | no | — |
| ssh_private_key | SSH private key with which to SSH. | yes | — |
| ssh_keys_dir | Path for a directory to store ssh keys. Random directory in the temp folder will be generated by default. | no | — |
| container | The name or ID of a container inside of the virtual machine instance to connect to. This only applies to virtual machines that are using a Google Container-Optimized virtual machine image. | no | — |
| ssh_args | Additional flags to be passed to ssh tool. Example: '-vvv -L 80:%INSTANCE%:80'. | no | — |
| command | A command to run on the virtual machine. Action runs the command on the target instance and then exits. You must specify at least command or script, specifying both command and script is invalid. | no | — |
| script | A path for a bash script to run on the virtual machine. Action runs the file on the target instance and then exits. You must specify at least command or script, specifying both command and script is invalid. | no | — |
| project_id | The GCP project ID. Overrides project ID set by credentials. | no | — |
| flags | Space separated list of other compute ssh flags, examples can be found: https://cloud.google.com/sdk/gcloud/reference/compute/ssh/#FLAGS. Ex --ssh-key-expiration=2017-08-29T18:52:51.142Z. | no | — |
| gcloud_version | Version of the Cloud SDK to install. If unspecified or set to "latest", the latest available gcloud SDK version for the target platform will be installed. Example: "290.0.1". | no | — |
| gcloud_component | Version of the Cloud SDK components to install and use. If unspecified, the latest or released version will be used. This is the equivalent of running 'gcloud alpha run' or 'gcloud beta run'. Valid values are `alpha` or `beta`. | no | — |
Outputs
| name | description |
|---|---|
| stdout | Stdout from ssh command. |
| stderr | Stderr from ssh command. |