Skip to content

Add dry-run mode to the Scala Steward workflow#698

Merged
ptrdom merged 3 commits into
mainfrom
scala-steward-dry-run
Jul 12, 2026
Merged

Add dry-run mode to the Scala Steward workflow#698
ptrdom merged 3 commits into
mainfrom
scala-steward-dry-run

Conversation

@ptrdom

@ptrdom ptrdom commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a dry-run mode to the Scala Steward workflow, mirroring the release workflow's structure. scala-steward.yml (parent) determines a run kind and fans out to the reusable _scala-steward-run.yml pipeline, gated on inputs.kind.

  • LIVE -- workflow_dispatch / schedule / push to main: unchanged real run (GitHub App auth, opens dependency-update PRs). The action invocation is byte-for-byte the same as before.
  • DRY_RUN -- pull_request to main: exercises the full update-detection pipeline with updates.limit = 0 (Allow updates.limit option to be zero scala-steward-org/scala-steward#1828) so PRs validate the workflow, its sbt/scalafmt pins and the action version without opening any PRs, using the read-only github.token (works on fork PRs too).

Config merging

The dry-run repo-config (.github/scala-steward-dry-run.conf) is Scala Steward's global/default config, merged per-field with the repo's own .scala-steward.conf (RepoConfigAlg: global |+| repo). The existing updates.ignore and updatePullRequests are preserved; only updates.limit = 0 is added. The effective dry-run config is therefore the live config capped at zero PRs.

Notes

Watch the first dry-run run here to confirm the action falls back cleanly to github.token when no github-app-* inputs are supplied on v2.92.0. The updates.limit = 0 cap makes it safe regardless.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

ptrdom and others added 2 commits July 12, 2026 13:12
Mirror the release workflow's structure: scala-steward.yml (parent)
determines a run kind and fans out to the reusable _scala-steward-run.yml
pipeline, gated on inputs.kind.

  LIVE    - workflow_dispatch / schedule / push to main: unchanged real run
            (GitHub App auth, opens dependency-update PRs).
  DRY_RUN - pull_request to main: exercise the full update-detection pipeline
            with updates.limit = 0 (scala-steward#1828) so PRs validate the
            workflow, its sbt/scalafmt pins and the action version without
            opening any PRs, using the read-only github.token.

The dry-run repo-config is Scala Steward's global default, merged per-field
with the repo's own .scala-steward.conf (global |+| repo), so the existing
updates.ignore and updatePullRequests are preserved; only updates.limit is
added. The LIVE action invocation is unchanged from before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The scala-steward-action reads the repo-config file from the runner
workspace, but the workflow never runs actions/checkout (Scala Steward
clones target repos itself), so the dry-run config file was absent and
the dry run failed with a does-not-exist error. Check the repo out for
the DRY_RUN kind only; LIVE needs no checkout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ptrdom ptrdom enabled auto-merge (squash) July 12, 2026 10:27
@ptrdom ptrdom merged commit 2f9f83e into main Jul 12, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant