Add actions directory structure and Go-based build tooling for custom GitHub Actions#5953
Conversation
|
@copilot update .gitattributes to mark compiler generated files |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Created actions/ directory with subdirectories for safe-inputs-copy and safe-outputs-copy - Added action.yml files for both actions with proper metadata - Created source JavaScript files in src/ directories - Implemented build-actions.js script for bundling, validation, and cleaning - Added Makefile targets: actions-build, actions-validate, actions-clean - Updated .gitignore to include bundled index.js but exclude temp artifacts - Added comprehensive documentation in actions/README.md - Successfully built and validated both initial actions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Clarified TODO about automatic dependency resolution - Added note about manual dependency mapping maintenance - Recompiled workflow lock files after build Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added actions/*/index.js pattern to mark bundled action files as linguist-generated Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot names should be "safe-inputs", "safe-outputs". |
…/safe-outputs - Renamed action directories to use hyphenated names without -copy suffix - Updated all documentation references in README files - Updated build-actions.js dependency mapping - Updated action.yml names to "Safe Inputs" and "Safe Outputs" - Rebuilt and validated actions with new names Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot rename safe-inputs, safe-outputs to setup-safe-inputs, setup-safe-outputs |
- Renamed action directories from safe-inputs/safe-outputs to setup-safe-inputs/setup-safe-outputs - Updated all documentation references in README files - Updated build-actions.js dependency mapping - Updated action.yml names to "Setup Safe Inputs" and "Setup Safe Outputs" - Rebuilt and validated actions with new names Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main |
…s-directory-structure # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Created Architecture & Decisions:
Implementation Details:
Developer Guide:
The spec provides a complete reference for understanding and extending the custom actions build system. (ce1f051) |
|
|
||
| ```bash | ||
| # Build all actions | ||
| gh aw actions-build |
There was a problem hiding this comment.
@copilot remove gh aw actions-build reference, and only use make commands
There was a problem hiding this comment.
Removed all gh aw actions-build CLI references from specs/actions.md. The document now only shows Makefile commands (make actions-build, etc.) as the primary interface. (933ec75)
There was a problem hiding this comment.
@copilot this document looks outdated. Look at the current changes and update. The build process is now all in go.
There was a problem hiding this comment.
Updated specs/actions.md to accurately reflect the current Go-based implementation:
- Added prominent notes that build system is 100% Go code (no JavaScript build scripts)
- Updated architecture diagram to show Makefile →
go runflow - Clarified component responsibilities with Makefile as entry point
- Emphasized throughout that there are no JavaScript build scripts (no
scripts/build-actions.js) - Updated key files section to highlight pure Go implementation in
pkg/cli/actions_build_command.go
The spec now correctly documents that all build logic is in Go and reuses the workflow compiler's bundler infrastructure. (933ec75)
|
📰 DEVELOPING STORY: Smoke Copilot Playwright reports failed. Our correspondents are investigating the incident... |
|
🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request... |
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
|
|
|
|
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 https://github.com/githubnext/gh-aw/tree/copilot/create-actions-directory-structure |
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Status: PASS
|
|
Recent merged PRs: [WIP] Format code, lint and fix failing tests; Add ci-cleaner custom agent for automating repository CI maintenance
|
…sage Changes: - Removed all CLI command references (gh aw actions-*) - Updated to only show Makefile commands (make actions-build, etc.) - Added prominent notes that build system is 100% Go (no JavaScript build scripts) - Updated architecture diagram to show Makefile → go run flow - Clarified component responsibilities with Makefile as entry point - Emphasized throughout that there are no JavaScript build scripts - Updated key files section to highlight pure Go implementation The spec now accurately reflects that the build system is entirely Go-based and invoked via Makefile for development. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Smoke Test ResultsPRs: #5974 (Format code, lint and fix failing tests), #5975 (Add ci-cleaner custom agent) ✅ GitHub MCP: Read merged PRs Status: PASS
|
|
@copilot move the new command out of the cli into an internal tool |
Moved actions-build, actions-validate, and actions-clean commands out of the main gh-aw CLI into an internal development tool: - Created internal/tools/actions-build/main.go as lightweight CLI dispatcher - Removed action commands from cmd/gh-aw/main.go (no longer in end-user CLI) - Updated Makefile to invoke internal tool: go run ./internal/tools/actions-build - Updated specs/actions.md to document internal tool architecture - Commands remain available via Makefile: make actions-build, etc. These are development-only commands not intended for end users, so they belong in an internal tool rather than the main CLI. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Moved actions commands out of the main Created: Commands remain accessible via Makefile ( |
… GitHub Actions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Plan: Create Actions Directory Structure and Build Tooling
Understanding
Checklist
actions/directory at repository rootactions/{action-name}/)action.ymlformatindex.js(bundled output location)src/directory for source filesREADME.mdtemplatemake actions-build- Bundle all action JavaScriptmake actions-validate- Validate action.yml filesmake actions-clean- Clean generated files.gitignoreappropriately (include bundled index.js, exclude temp artifacts)actions/setup-safe-inputs/- Copy safe-inputs files locally (7 embedded files)actions/setup-safe-outputs/- Copy safe-outputs files locally (9 embedded files)Summary
Successfully implemented the foundational directory structure and Go-based build tooling for custom GitHub Actions. The system reuses the workflow bundler and script registry infrastructure, providing a unified approach to JavaScript bundling across the project.
Key Features
✅ Clean, organized directory structure following GitHub Actions standards
✅ 100% Go-based build system - No JavaScript build scripts
✅ Internal development tool - Commands separated from main
gh awCLI✅ Script registry integration for accessing embedded JavaScript sources
✅ Automated build tooling that embeds JavaScript dependencies
✅ Validation system for action.yml files
✅ Makefile interface - Primary way to invoke build commands
✅ Direct go run execution - No binary build required for development commands
✅ CI integration - Actions are built and validated in CI pipeline
✅ Comprehensive specification - Complete documentation in
specs/actions.md✅ Two initial actions ready for use: setup-safe-inputs and setup-safe-outputs
✅ Proper .gitignore configuration
✅ Generated files marked in .gitattributes
✅ Standard naming convention with "setup-" prefix following GitHub Actions best practices
✅ Merged with latest main branch changes
Build System Architecture
The build system consists of:
internal/tools/actions-build/main.go): Lightweight CLI dispatcher for development commandspkg/cli/actions_build_command.go): Pure Go implementation reusing workflow bundler infrastructuremake actions-build,make actions-validate,make actions-clean)Commands are not part of the main
gh awCLI (which is for end users), but are invoked through the Makefile which runs the internal tool atinternal/tools/actions-build.CI Integration
Added
actions-buildjob to.github/workflows/ci.yml:lintjobmake actions-buildmake actions-validateactions/**files changeDocumentation
Updated
specs/actions.mdwith accurate documentation:Key clarifications:
internal/tools/actions-build), not main CLImake actions-build, etc.)Next Steps (Future Work)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Changeset