-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathaction.yml
111 lines (94 loc) · 3.48 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: SSH to Google Cloud Platform compute instances
author: Google LLC
description: |-
Use this action to connect to Google Cloud Platform instances via ssh and execute user's commands.
inputs:
instance_name:
description: |-
Name of the virtual machine instance to SSH into.
required: true
zone:
description: |-
Zone of the instance to connect to.
required: true
user:
description: |-
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.
required: false
ssh_private_key:
description: |-
SSH private key with which to SSH.
required: true
ssh_keys_dir:
description: |-
Path for a directory to store ssh keys. Random directory in the temp folder will be generated by default.
required: false
container:
description: |-
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.
required: false
ssh_args:
description: |-
Additional flags to be passed to ssh tool. Example: '-vvv -L 80:%INSTANCE%:80'.
required: false
command:
description: |-
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.
required: false
script:
description: |-
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.
required: false
project_id:
description: The GCP project ID. Overrides project ID set by credentials.
required: false
flags:
description: |-
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.
required: false
gcloud_version:
description: |-
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".
required: false
gcloud_component:
description: |-
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`.
required: false
outputs:
stdout:
description: Stdout from ssh command.
stderr:
description: Stderr from ssh command.
branding:
icon: 'terminal'
color: 'blue'
runs:
using: 'node20'
main: 'dist/main/index.js'
post: 'dist/post/index.js'