add push flag to indicate target it GHAE

Signed-off-by: Florian Wagner <h2floh@github.com>
This commit is contained in:
Florian Wagner
2022-11-03 06:56:42 +00:00
parent 86c578bdf2
commit 6d732db1cf
2 changed files with 3 additions and 1 deletions

View File

@@ -96,6 +96,8 @@ When no machine has access to both the public internet and the GHES instance:
Limit push to specific repositories in the cache directory.
- `actions-admin-user` _(optional)_
The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass `actions-admin`. If not set, the impersonation is disabled. Note that `site_admin` scope is required in the token for the impersonation to work.
- `destination-is-ghae` _(optional)_
Indicates if the destination applicance is GHAE.
**Example Usage:**

View File

@@ -43,7 +43,7 @@ func (f *PushOnlyFlags) Init(cmd *cobra.Command) {
cmd.Flags().StringVar(&f.ActionsAdminUser, "actions-admin-user", "", "A user to impersonate for the push requests. To use the default name, pass 'actions-admin'. Note that the site_admin scope in the token is required for the impersonation to work.")
cmd.Flags().StringVar(&f.Token, "destination-token", "", "Token to access API on GHES instance")
cmd.Flags().BoolVar(&f.DisableGitAuth, "disable-push-git-auth", false, "Disables git authentication whilst pushing")
f.IsAE = false
cmd.Flags().BoolVar(&f.IsAE, "destination-is-ghae", false, "Destination instance is GHAE")
}
func (f *PushFlags) Validate() Validations {