Migration Core
5-Phase Workflow
All migrations follow these phases in order — skipping any phase is a completion failure.
Phase 1 — Source
- REQUIRE actual source CI/CD files from the user. Refuse to proceed without them.
- NEVER invent workflows from descriptions, requirements, or assumptions.
- Common filenames:
Jenkinsfile, azure-pipelines.yml, .circleci/config.yml, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, bamboo-specs.yml, .drone.yml (and any included/referenced files).
Phase 2 — Analyze
Examine the source thoroughly. Identify:
- Pipeline/job/stage structure and dependencies
- Triggers, conditions, branching strategy
- Agents/executors/containers → GitHub runner mapping
- Credential bindings, secrets, env vars
- Caching, artifacts, matrix builds, parallelism
- Platform-specific features with no direct Actions equivalent (see the platform skill's
mapping.md)
Phase 3 — Convert
- Convert only what's in the source — no added functionality.
- Use the platform skill's
mapping.md for syntax translations.
- Use only marketplace actions from verified creators (see Guardrails below).
- Translate triggers, conditional logic, env/secrets references, services, artifacts, caches.
- Expand all platform-specific includes/templates/shared-libraries inline.
- Add comments explaining non-obvious conversion choices.
Phase 4 — Validate
Load and follow the actionlint skill: install the tool if needed, run it against all generated workflows, resolve every finding, and capture the real output for the report.
Phase 5 — Document
- Write
.github/ci-archive/MIGRATION-README.md using the platform skill's report-template.md, filled with real data — no placeholders, real actionlint output.
- MOVE original CI/CD files into
.github/ci-archive/ and DELETE them from their original locations (see Archival below).
- Deliver the report via PR: update an existing PR on the branch if present; otherwise create a new one. If PR creation/update is unavailable, the
MIGRATION-README.md is the sole report.
Guardrails
❌ Never do
- Create workflows without a real source CI/CD file.
- Generate pipelines from descriptions or assumptions.
- Add functionality not in the source.
- Write custom actions, scripts, or bespoke integrations — find a marketplace action.
- Use unverified, community, or deprecated actions.
- Skip validation, leave originals in their original location, or ship placeholder text in the PR/report.
✅ Always do
- Work exclusively from the provided source files.
- Use only verified creators on the GitHub Marketplace — e.g.
actions/*, azure/*, aws-actions/*, google-github-actions/*.
- Use the latest stable version of each action.
- Pin every action to a commit SHA (never a tag/branch); add a comment with the SHA→version mapping.
- Apply least-privilege
permissions: blocks.
- Document every secret and variable the migrated workflow requires.
Action version verification
mcp_github_get_latest_release — find the current version.
mcp_github_get_tag — resolve the commit SHA.
- Fallback:
mcp_github_list_commits if the repo has no releases.
# actions/checkout v4.1.7
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Secrets and variables
${{ secrets.NAME }} — sensitive credentials; never log or echo, never put values in workflow files.
${{ vars.NAME }} — non-sensitive configuration.
- Org-level for shared values; repo-level for project-specific values.
- Platform-specific secret syntax mappings live in the platform skill's
mapping.md.
Deliverables and Archival
Required deliverables
- Runnable
.github/workflows/*.yml replicating source functionality.
- All required secrets/variables documented with names and purpose.
- Conversion explanations as comments in workflows and notes in the report.
- Real
actionlint output pasted into the report (see actionlint skill).
- Source files archived and deleted from original locations.
.github/ci-archive/MIGRATION-README.md — complete, no placeholders.
- Pull Request with the report as its body (or
MIGRATION-README.md as fallback).
Archival protocol
mkdir -p .github/ci-archive/
MOVE (don't copy) source CI/CD files. Examples:
| Original |
Archive destination |
Jenkinsfile |
.github/ci-archive/Jenkinsfile |
azure-pipelines.yml |
.github/ci-archive/azure-pipelines.yml |
.circleci/config.yml |
.github/ci-archive/circleci-config.yml (delete .circleci/ dir) |
.gitlab-ci.yml |
.github/ci-archive/.gitlab-ci.yml |
.travis.yml |
.github/ci-archive/.travis.yml |
.drone.yml |
.github/ci-archive/.drone.yml |
bitbucket-pipelines.yml |
.github/ci-archive/bitbucket-pipelines.yml |
bamboo-specs.yml |
.github/ci-archive/bamboo-specs.yml |
Verify nothing remains in the original locations.
Completion Checklist (10 items)
Migration is NOT COMPLETE until all 10 are true:
- Source file(s) provided and analyzed
- Workflow(s) accurately replicate source functionality
- Only verified marketplace actions used, latest stable versions, pinned to SHAs
actionlint executed per the actionlint skill; real output captured
- All required secrets and variables documented
- Original CI/CD files moved to
.github/ci-archive/ and deleted from original locations
.github/ci-archive/MIGRATION-README.md written from the platform's report-template.md, no placeholders
- Migration report delivered via PR (existing PR updated, or new PR created) where possible
- All guardrails above satisfied
- Response ends with:
Migration complete. MIGRATION-README.md created and Pull Request updated/created with migration report.
(If PR was unavailable: Migration complete. MIGRATION-README.md created in .github/ci-archive/)
1---2name: migration-core3description: 5-phase migration process, security guardrails, deliverables, archival protocol, and the 10-item completion checklist for any CI/CD migration to GitHub Actions. Load at the start of every migration.4---56# Migration Core78## 5-Phase Workflow910All migrations follow these phases **in order** — skipping any phase is a completion failure.1112### Phase 1 — Source1314- **REQUIRE** actual source CI/CD files from the user. Refuse to proceed without them.15- **NEVER** invent workflows from descriptions, requirements, or assumptions.16- Common filenames: `Jenkinsfile`, `azure-pipelines.yml`, `.circleci/config.yml`, `.gitlab-ci.yml`, `.travis.yml`, `bitbucket-pipelines.yml`, `bamboo-specs.yml`, `.drone.yml` (and any included/referenced files).1718### Phase 2 — Analyze1920Examine the source thoroughly. Identify:2122- Pipeline/job/stage structure and dependencies23- Triggers, conditions, branching strategy24- Agents/executors/containers → GitHub runner mapping25- Credential bindings, secrets, env vars26- Caching, artifacts, matrix builds, parallelism27- Platform-specific features with no direct Actions equivalent (see the platform skill's `mapping.md`)2829### Phase 3 — Convert3031- Convert **only** what's in the source — no added functionality.32- Use the platform skill's `mapping.md` for syntax translations.33- Use only marketplace actions from verified creators (see Guardrails below).34- Translate triggers, conditional logic, env/secrets references, services, artifacts, caches.35- Expand all platform-specific includes/templates/shared-libraries inline.36- Add comments explaining non-obvious conversion choices.3738### Phase 4 — Validate3940Load and follow the `actionlint` skill: install the tool if needed, run it against all generated workflows, resolve every finding, and capture the real output for the report.4142### Phase 5 — Document43441. Write `.github/ci-archive/MIGRATION-README.md` using the platform skill's `report-template.md`, filled with real data — no placeholders, real actionlint output.452. **MOVE** original CI/CD files into `.github/ci-archive/` and **DELETE** them from their original locations (see Archival below).463. Deliver the report via PR: update an existing PR on the branch if present; otherwise create a new one. If PR creation/update is unavailable, the `MIGRATION-README.md` is the sole report.4748---4950## Guardrails5152### ❌ Never do5354- Create workflows without a real source CI/CD file.55- Generate pipelines from descriptions or assumptions.56- Add functionality not in the source.57- Write custom actions, scripts, or bespoke integrations — find a marketplace action.58- Use unverified, community, or deprecated actions.59- Skip validation, leave originals in their original location, or ship placeholder text in the PR/report.6061### ✅ Always do6263- Work exclusively from the provided source files.64- Use only **verified creators** on the [GitHub Marketplace](https://github.com/marketplace) — e.g. `actions/*`, `azure/*`, `aws-actions/*`, `google-github-actions/*`.65- Use the **latest stable version** of each action.66- **Pin every action to a commit SHA** (never a tag/branch); add a comment with the SHA→version mapping.67- Apply **least-privilege** `permissions:` blocks.68- Document every secret and variable the migrated workflow requires.6970### Action version verification71721. `mcp_github_get_latest_release` — find the current version.732. `mcp_github_get_tag` — resolve the commit SHA.743. Fallback: `mcp_github_list_commits` if the repo has no releases.7576```yaml77# actions/checkout v4.1.778- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf333279```8081### Secrets and variables8283- `${{ secrets.NAME }}` — sensitive credentials; never log or echo, never put values in workflow files.84- `${{ vars.NAME }}` — non-sensitive configuration.85- Org-level for shared values; repo-level for project-specific values.86- Platform-specific secret syntax mappings live in the platform skill's `mapping.md`.8788---8990## Deliverables and Archival9192### Required deliverables93941. Runnable `.github/workflows/*.yml` replicating source functionality.952. All required secrets/variables documented with names and purpose.963. Conversion explanations as comments in workflows and notes in the report.974. Real `actionlint` output pasted into the report (see `actionlint` skill).985. Source files archived and deleted from original locations.996. `.github/ci-archive/MIGRATION-README.md` — complete, no placeholders.1007. Pull Request with the report as its body (or `MIGRATION-README.md` as fallback).101102### Archival protocol103104```bash105mkdir -p .github/ci-archive/106```107108**MOVE** (don't copy) source CI/CD files. Examples:109110| Original | Archive destination |111|---|---|112| `Jenkinsfile` | `.github/ci-archive/Jenkinsfile` |113| `azure-pipelines.yml` | `.github/ci-archive/azure-pipelines.yml` |114| `.circleci/config.yml` | `.github/ci-archive/circleci-config.yml` (delete `.circleci/` dir) |115| `.gitlab-ci.yml` | `.github/ci-archive/.gitlab-ci.yml` |116| `.travis.yml` | `.github/ci-archive/.travis.yml` |117| `.drone.yml` | `.github/ci-archive/.drone.yml` |118| `bitbucket-pipelines.yml` | `.github/ci-archive/bitbucket-pipelines.yml` |119| `bamboo-specs.yml` | `.github/ci-archive/bamboo-specs.yml` |120121Verify nothing remains in the original locations.122123---124125## Completion Checklist (10 items)126127Migration is **NOT COMPLETE** until all 10 are true:1281291. Source file(s) provided and analyzed1302. Workflow(s) accurately replicate source functionality1313. Only verified marketplace actions used, latest stable versions, pinned to SHAs1324. `actionlint` executed per the `actionlint` skill; real output captured1335. All required secrets and variables documented1346. Original CI/CD files moved to `.github/ci-archive/` and deleted from original locations1357. `.github/ci-archive/MIGRATION-README.md` written from the platform's `report-template.md`, no placeholders1368. Migration report delivered via PR (existing PR updated, or new PR created) where possible1379. All guardrails above satisfied13810. Response ends with:139140> Migration complete. MIGRATION-README.md created and Pull Request updated/created with migration report.141142(If PR was unavailable: *Migration complete. MIGRATION-README.md created in .github/ci-archive/*)