-
Notifications
You must be signed in to change notification settings - Fork 43
Add support for importing classic GitHub Actions workflows (.yml) #12775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support to import classic GitHub action workflows
Add support for importing classic GitHub Actions workflows (.yml)
Jan 30, 2026
pelikhan
reviewed
Jan 30, 2026
Contributor
|
@copilot merge main, recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
|
@copilot use ci.yml as example |
…mport-github-actions
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
This was referenced Jan 30, 2026
…ample Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
#12784) * Initial plan * Initial analysis of failing Integration: Workflow Misc Part 2 tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Fix deprecated fields validation by adding timeout_minutes to schema Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Fix template expression wrapping and update integration tests - Added extractAndReplacePlaceholders() and generatePlaceholderName() to runtime_import.cjs to convert template conditionals with GitHub expressions to placeholders - Updated integration tests to reflect that main workflow markdown uses runtime-import, so placeholders are generated at runtime, not during compilation - Tests now check for placeholders in the GitHub context section (which is in compiled YAML) and verify runtime-import macro is present for user content Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Fix action pins count and update parser test for timeout_minutes - Updated TestGetActionPinsSorting to expect 43 pins instead of 42 - Updated TestGetMainWorkflowDeprecatedFields to expect timeout_minutes in deprecated list - This allows strict mode to properly detect and reject deprecated timeout_minutes field Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Completed: Add support to import existing classic GitHub action workflows (.yml)
Summary
Successfully implemented support for importing existing classic GitHub Actions workflows (
.ymlfiles) into gh-aw markdown workflows. This allows users to reuse existing workflows, migrate incrementally, and share common jobs.Recent Updates
license-check.ymlworkflow from the repositoryImplementation Completed
File Type Detection
.ymland.yamlextensions (case-insensitive).lock.ymlfiles with clear error messageaction.yml(GitHub Action definitions) and workflow filesYAML Workflow Parser
Integration with Import Processor
.lock.ymlfiles before processingImportsResultMerge Logic
Comprehensive Testing
Example Workflows
test-yaml-import.mddemonstrating YAML importlicense-check.ymlfrom the repository as the import exampleValidation
make fmt- PASSEDmake lint- PASSEDmake test-unit- PASSEDKey Features
What Works:
✅ Import classic GitHub Actions YAML workflows into markdown workflows
✅ Extract and merge jobs from imported YAML files
✅ Extract and merge services from job definitions
✅ Preserve job dependencies (
needsfield)✅ Reject
.lock.ymlfiles with helpful error message✅ Reject
action.ymlfiles (action definitions)✅ Validate YAML syntax and workflow structure
✅ Main workflow jobs override imported jobs (no conflicts)
Error Handling:
Tested Scenarios:
Example Usage
The compiled workflow will include the
license-checkjob from the imported YAML file, demonstrating how existing GitHub Actions workflows can be seamlessly integrated into gh-aw markdown workflows.Files Changed
New Files:
pkg/parser/yaml_import.go- YAML workflow parsing logicpkg/parser/yaml_import_test.go- Unit testspkg/parser/yaml_import_e2e_test.go- End-to-end tests.github/workflows/test-yaml-import.md- Example markdown workflowModified Files:
pkg/parser/import_processor.go- Added YAML import handlingpkg/workflow/compiler_orchestrator_workflow.go- Added job merging logicAll validation passed. Feature is complete and ready for review!
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.