You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SSH key can be used for git operations while token is used
for GitHub API calls (gh commands, PR creation, etc).
This is a valid and useful configuration.
Copy file name to clipboardExpand all lines: updater/action.yml
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,11 @@ inputs:
34
34
required: false
35
35
default: ''
36
36
api-token:
37
-
description: 'Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}. Not required if ssh-key is provided.'
37
+
description: 'Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}. Not required if ssh-key is provided, but can be used together with ssh-key for GitHub API operations.'
38
38
required: false
39
39
default: ''
40
40
ssh-key:
41
-
description: 'SSH private key for repository authentication. Alternative to api-token. Use for deploy key authentication.'
41
+
description: 'SSH private key for repository authentication. Can be used alone or together with api-token (SSH for git, token for GitHub API).'
42
42
required: false
43
43
default: ''
44
44
post-update-script:
@@ -136,17 +136,16 @@ runs:
136
136
exit 1
137
137
}
138
138
139
-
if ($hasToken -and $hasSshKey) {
140
-
Write-Output "::error::Both api-token and ssh-key were provided. Please provide only one."
141
-
exit 1
142
-
}
143
-
144
139
if ($hasToken -and $env:GH_TOKEN -match '-----BEGIN') {
145
140
Write-Output "::error::The api-token input appears to contain an SSH private key."
146
141
Write-Output "::error::Please use the ssh-key input for SSH authentication instead of api-token."
147
142
exit 1
148
143
}
149
144
145
+
if ($hasToken -and $hasSshKey) {
146
+
Write-Output "Using both SSH key (for git) and token (for GitHub API)"
0 commit comments