frequenz-floss/Dependabot Migrate

Run migration scripts on Dependabot PRs — fetch and execute per-version scripts, commit changes, post a summary, and optionally auto-approve and auto-merge.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 2, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: frequenz-floss/gh-action-dependabot-migrate@e93e3b50930132717c9aabdd09413a6737d4b7ef # v1.3.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
script-url-templateURL template for the migration script. Use {version} as a placeholder for the version tag (e.g. v0.15.0). Mutually exclusive with `migration-script` — provide exactly one.no""
migration-scriptInline migration script body (Python). The script is saved to a temporary file and executed with `python3 -I` once per version in the upgrade range, exactly like URL-fetched scripts. The current version being migrated is available as the `MIGRATION_VERSION` environment variable. Mutually exclusive with `script-url-template` — provide exactly one.no""
tokenToken used for pushing migration commits, PR approval, and auto-merge. Must trigger follow-up workflows (merge queue CI, etc.) — typically a GitHub App token or PAT, since GITHUB_TOKEN does not trigger follow-up workflows. If the migration can modify workflow files (.github/workflows/*), this token also needs workflow-write permission. When omitted, migration commits are pushed with GITHUB_TOKEN and no auto-approve or auto-merge is performed. The workflow is responsible for generating this token (e.g. via actions/create-github-app-token in a prior step). When `sign-commits` is "true", this token is also used for GraphQL `createCommitOnBranch` commit creation.no""
sign-commitsWhen "true", create migration commits via GitHub's GraphQL `createCommitOnBranch` mutation so commits are marked as verified when supported (for example with GitHub App tokens). When "false" (default), use local `git commit` and `git push`.nofalse
migration-tokenToken exposed to migration scripts as GITHUB_TOKEN and GH_TOKEN. When omitted, the migration script runs with no GitHub credentials at all. The workflow is responsible for generating this token if needed.no""
auto-merge-on-changesWhen "true", auto-approve and auto-merge even when the migration produced commits. When "false" (default), auto-merge is only enabled for patch-only updates and migrations that produce no file changes; migration commits require a human review. Requires `token` to be set.nofalse
report-titleHeading used for PR comments and job summaries emitted by this action. Do not include Markdown heading markers. When empty, the calling workflow title is used.no""
version-iterationControls which intermediate versions to run migration scripts for when a multi-version jump is detected. "false" runs only the target version; "major" runs for each major boundary (vX.0.0); "minor" also runs for each minor boundary within the target major; "patch" also runs for each patch within the target minor. When empty (default), falls back to the deprecated `iterate-v0-minors` input for backward compatibility.no""
if-no-iterationsControls what happens when `version-iteration` produces no versions to migrate. "error" fails the action so the unexpected no-op is not missed; "pass" treats it as a clean migration with no file changes. When empty (default), uses "error" — except under the deprecated `iterate-v0-minors` fallback or when neither iteration input is set (implicit v0.x default), where it defaults to "pass" for backward compatibility.no""
iterate-v0-minorsDeprecated — use `version-iteration` instead. When "true", v0.x bumps iterate through each intermediate minor version. When "false", only the target version is run. When empty (default), the input is inactive. Mutually exclusive with `version-iteration`.no""
python-versionPython version to use for running the migration script.no3.14
expected-actorGitHub actor whose pull requests trigger migration and auto-approval. Used to distinguish bot-triggered events (Dependabot opens or synchronises a PR) from human-triggered label events (intervention resolution). Steps gated by this check: Dependabot metadata fetch (step 5), migration decision (step 6), and patch-only auto-approval (step 22).nodependabot[bot]
migrated-labelLabel name used to mark that migration has run.nomigrated
migrated-label-colorHex colour to use if the migrated-label needs to be created (#RRGGBB).no#2B8383
migrated-label-descriptionLabel description to use if the migrated-label needs to be created.noMigration script has been run
intervention-pending-labelLabel name used when migration requires manual intervention.nointervention-pending
intervention-pending-label-colorHex colour to use if the intervention-pending-label needs to be created (#RRGGBB).no#DE36AD
intervention-pending-label-descriptionLabel description to use if the intervention-pending-label needs to be created.noMigration requires manual intervention
intervention-done-labelLabel name used when manual intervention is completed.nointervention-done
intervention-done-label-colorHex colour to use if the intervention-done-label needs to be created (#RRGGBB).no#0E8A16
intervention-done-label-descriptionLabel description to use if the intervention-done-label needs to be created.noManual migration intervention has been completed
auto-merged-labelLabel name used when this action enables auto-merge.noauto-merged
auto-merged-label-colorHex colour to use if the auto-merged-label needs to be created (#RRGGBB).no#0E8A16
auto-merged-label-descriptionLabel description to use if the auto-merged-label needs to be created.noPR was auto-merged by automation
namedescription
migration_ranWhether migration has been handled: "true" when script(s) executed, when no versions needed migrating and `if-no-iterations` is "pass", when a previous run already migrated this PR, or when the update is patch-only without `version-iteration`. "false" otherwise.
overall_exitConsolidated outcome code: "0" when no intervention is needed for this run, "1" when migration or intervention handling requires attention, or when a required pre-check fails.
needs_migrationWhether this run entered the migration flow: "true" for minor/major bumps and patch bumps when `version-iteration` is set, "false" for patch-only bumps without `version-iteration`, already-migrated re-triggers, and other runs that do not enter migration.
commit_madeWhether this run produced a migration commit. "false" when no commit was made.