Add dry-run mode to the Scala Steward workflow#698
Merged
Conversation
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>
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
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.
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.ymlpipeline, gated oninputs.kind.workflow_dispatch/schedule/pushtomain: unchanged real run (GitHub App auth, opens dependency-update PRs). The action invocation is byte-for-byte the same as before.pull_requesttomain: exercises the full update-detection pipeline withupdates.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-onlygithub.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 existingupdates.ignoreandupdatePullRequestsare preserved; onlyupdates.limit = 0is 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.tokenwhen nogithub-app-*inputs are supplied on v2.92.0. Theupdates.limit = 0cap makes it safe regardless.Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com