Skip to content

[plan] Update compiler to support custom action references #5949

Description

@github-actions

Objective

Modify the workflow compiler to generate references to custom actions instead of embedding JavaScript inline via actions/github-script.

Context

The compiler currently uses DefaultScriptRegistry and bundling to embed JavaScript. We need to add a mode where it emits uses: references to custom actions instead.

Approach

  1. Add a compilation mode flag (e.g., --action-mode=custom|inline)
  2. Update pkg/workflow/compiler.go to support custom action references
  3. Modify step generation to emit:
    # Development mode
    - uses: ./actions/check-membership
    
    # Release mode (to be implemented in separate task)
    - uses: githubnext/gh-aw/.github/actions/check-membership@SHA
  4. Update script_registry.go to support mapping script names to action paths
  5. Add tests for both inline and custom action modes

Files to Modify

  • pkg/workflow/compiler.go
  • pkg/workflow/script_registry.go
  • pkg/workflow/bundler.go (if needed)
  • Add tests: pkg/workflow/compiler_custom_actions_test.go

Acceptance Criteria

  • Compiler can generate workflows using custom action references
  • Development mode uses local paths (./actions/...)
  • Action inputs are properly mapped from script parameters
  • All existing inline tests still pass
  • New tests validate custom action mode compilation
  • No breaking changes to existing workflows
    Related to [plan] Refactor compiler to use custom actions for JavaScript code #5947

AI generated by Plan Command for #5946

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions