Skip to content

Commit 561e225

Browse files
Copilotpelikhan
andauthored
Switch release setup-cli repo to gh-aw-actions
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent bb2a018 commit 561e225

4 files changed

Lines changed: 8 additions & 17 deletions

File tree

pkg/cli/copilot_setup.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var copilotSetupLog = logger.New("cli:copilot_setup")
2323
func getActionRef(ctx context.Context, actionMode workflow.ActionMode, version string, resolver workflow.SHAResolver) string {
2424
if actionMode.IsRelease() && version != "" && version != "dev" {
2525
if resolver != nil {
26-
sha, err := resolver.ResolveSHA(ctx, "github/gh-aw/actions/setup-cli", version)
26+
sha, err := resolver.ResolveSHA(ctx, "github/gh-aw-actions/setup-cli", version)
2727
if err == nil && sha != "" {
2828
return fmt.Sprintf("@%s # %s", sha, version)
2929
}
@@ -51,10 +51,7 @@ func generateCopilotSetupStepsYAML(ctx context.Context, actionMode workflow.Acti
5151

5252
if actionMode.IsRelease() || actionMode.IsAction() {
5353
// Determine the action repo based on mode
54-
actionRepo := "github/gh-aw/actions/setup-cli"
55-
if actionMode.IsAction() {
56-
actionRepo = "github/gh-aw-actions/setup-cli"
57-
}
54+
actionRepo := "github/gh-aw-actions/setup-cli"
5855
return fmt.Sprintf(`name: "Copilot Setup Steps"
5956
6057
# This workflow configures the environment for GitHub Copilot Agent with gh-aw MCP server
@@ -274,10 +271,7 @@ func renderCopilotSetupUpdateInstructions(ctx context.Context, filePath string,
274271
actionRef := getActionRef(ctx, actionMode, version, resolver)
275272

276273
if actionMode.IsRelease() || actionMode.IsAction() {
277-
actionRepo := "github/gh-aw/actions/setup-cli"
278-
if actionMode.IsAction() {
279-
actionRepo = "github/gh-aw-actions/setup-cli"
280-
}
274+
actionRepo := "github/gh-aw-actions/setup-cli"
281275
fmt.Fprintln(os.Stderr, " - name: Checkout repository")
282276
fmt.Fprintln(os.Stderr, " uses: actions/checkout@v6")
283277
fmt.Fprintf(os.Stderr, " - name: Install gh-aw extension\n")
@@ -341,10 +335,7 @@ func upgradeSetupCliVersionInContent(ctx context.Context, content []byte, action
341335
}
342336

343337
actionRef := getActionRef(ctx, actionMode, version, resolver)
344-
actionRepo := "github/gh-aw/actions/setup-cli"
345-
if actionMode.IsAction() {
346-
actionRepo = "github/gh-aw-actions/setup-cli"
347-
}
338+
actionRepo := "github/gh-aw-actions/setup-cli"
348339
newUses := actionRepo + actionRef
349340

350341
// Replace the uses: line, stripping any surrounding quotes in the process.

pkg/workflow/maintenance_workflow.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ func generateInstallCLISteps(ctx context.Context, actionMode ActionMode, version
5252
`
5353
}
5454

55-
// Release mode: use setup-cli action (consistent with copilot-setup-steps.yml)
56-
actionRepo := GitHubOrgRepo + "/actions/setup-cli"
55+
// Release mode: use setup-cli action from external gh-aw-actions repository
56+
actionRepo := GitHubActionsOrgRepo + "/setup-cli"
5757
ref := resolveActionRef(ctx, actionRepo, cliTag, resolver)
5858
return ` - name: Install gh-aw
5959
uses: ` + ref + `

pkg/workflow/mcp_setup_generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func generateAgenticWorkflowsInstallStep(c *Compiler, yaml *strings.Builder, has
180180

181181
cliVersion := resolveAgenticWorkflowsCLIVersion(c, workflowData)
182182
effectiveToken := getEffectiveGitHubToken("")
183-
actionRepo := GitHubOrgRepo + "/actions/setup-cli"
183+
actionRepo := GitHubActionsOrgRepo + "/setup-cli"
184184
installStep, err := generateGhAwSetupStep(ghAwSetupStepConfig{
185185
actionMode: c.actionMode,
186186
cliVersion: cliVersion,

pkg/workflow/runtime_definitions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var knownRuntimes = []*Runtime{
9494
{
9595
ID: "gh-aw",
9696
Name: "gh-aw CLI",
97-
ActionRepo: "github/gh-aw/actions/setup-cli",
97+
ActionRepo: "github/gh-aw-actions/setup-cli",
9898
ActionVersion: "", // Derived at compile time from the compiler version; see runtime_step_generator.go
9999
VersionField: "version",
100100
// Default version is computed at generation time from the current gh-aw build.

0 commit comments

Comments
 (0)