Skip to content

[plan] Refactor compiler to use custom actions for JavaScript code #5947

@github-actions

Description

@github-actions

Overview

This tracking issue covers the refactoring of the gh-aw compiler to store JavaScript code as custom GitHub Actions instead of embedding it inline in compiled workflows. This will reduce workflow file size, improve maintainability, and enable better code organization.

Source: Issue #5946

Current State

Currently, the compiler embeds ~200+ JavaScript files (.cjs) from pkg/workflow/js/ directly into compiled workflow files using actions/github-script. This results in very large workflow files with embedded JavaScript code.

Goals

  1. Store all JavaScript as pre-compiled custom actions in the repository
  2. Configure each JavaScript module as a standalone JavaScript custom action with action.yml
  3. Update compiler to emit references to local actions (development) or pinned SHA (release mode)
  4. Generate action.yml and README for each required action
  5. Maintain backward compatibility during transition

Planned Sub-Issues

  1. #aw_5946task001 - Create actions directory structure and tooling
  2. #aw_5946task002 - Update compiler to support custom action references
  3. #aw_5946task003 - Generate action.yml files for existing JavaScript modules
  4. #aw_5946task004 - Implement development vs release mode action references
  5. #aw_5946task005 - Migrate bundler and script registry to use custom actions

Success Criteria

  • All JavaScript code lives in actions/ directory
  • Each action has action.yml, bundled JavaScript, and README
  • Compiler emits local references in dev mode (./actions/action-name)
  • Compiler emits SHA-pinned references in release mode
  • Compiled workflows are significantly smaller
  • All tests pass with the new approach
    Related to Custom actions #5946

AI generated by Plan Command for #5946

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions