From 6d732db1cf8e12f2bb06adf27a15bafd368caf89 Mon Sep 17 00:00:00 2001 From: Florian Wagner Date: Thu, 3 Nov 2022 06:56:42 +0000 Subject: [PATCH] add push flag to indicate target it GHAE Signed-off-by: Florian Wagner --- README.md | 2 ++ src/push.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e081cb0..c7b5916 100644 --- a/README.md +++ b/README.md @@ -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:** diff --git a/src/push.go b/src/push.go index 81c4640..ffe7314 100644 --- a/src/push.go +++ b/src/push.go @@ -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 {