diff --git a/pkg/workflow/compiler_custom_actions_test.go b/pkg/workflow/compiler_custom_actions_test.go index d2bcc253d5..403ef7ad14 100644 --- a/pkg/workflow/compiler_custom_actions_test.go +++ b/pkg/workflow/compiler_custom_actions_test.go @@ -399,9 +399,9 @@ Test workflow with script mode. t.Error("Expected 'path: /tmp/gh-aw/actions-source' in checkout step for script mode") } - // 3. Checkout should use shallow clone (depth: 1) - if !strings.Contains(lockStr, "depth: 1") { - t.Error("Expected 'depth: 1' in checkout step for script mode (shallow checkout)") + // 3. Checkout should use shallow clone (fetch-depth: 1) + if !strings.Contains(lockStr, "fetch-depth: 1") { + t.Error("Expected 'fetch-depth: 1' in checkout step for script mode (shallow checkout)") } // 4. Setup step should run bash script instead of using "uses:" diff --git a/pkg/workflow/compiler_yaml_helpers.go b/pkg/workflow/compiler_yaml_helpers.go index c90375ddc7..4223bc1d2c 100644 --- a/pkg/workflow/compiler_yaml_helpers.go +++ b/pkg/workflow/compiler_yaml_helpers.go @@ -135,7 +135,7 @@ func (c *Compiler) generateCheckoutActionsFolder(data *WorkflowData) []string { " sparse-checkout: |\n", " actions\n", " path: /tmp/gh-aw/actions-source\n", - " depth: 1\n", + " fetch-depth: 1\n", " persist-credentials: false\n", } } @@ -209,7 +209,7 @@ func (c *Compiler) generateCheckoutGitHubFolder(data *WorkflowData) []string { " sparse-checkout: |\n", " .github\n", " .agents\n", - " depth: 1\n", + " fetch-depth: 1\n", " persist-credentials: false\n", } }