Conversation
Replace the hand-rolled GithubActionsGenerator and its circe workflow model
with zio-sbt-ci. The jobs are built from the module list in ZioAwsCi and
handed to the plugin through ciBuildJobs and ciReleaseJobs; the plugin's stock
lint, test, update-readme, gate and docs jobs, its permissions block and its
concurrency group are switched off so the workflow keeps its current shape.
Parsed as YAML, the generated ci.yml matches the previous one apart from
no-op defaults the plugin spells out (continue-on-error: false,
fail-fast: true, env: {}).
Scala Steward now runs as the zio-scala-steward GitHub App through the
plugin's workflow, and the auto-approve/auto-merge bot list is set to
dependabot, renovate and zio-scala-steward.
Depends on zio-sbt 'ciWorkflowPermissions' and 'ciReportSuccessfulJobs'
(zio/zio-sbt#823); pinned to a local snapshot until that is released.
auto-approve.yml, auto-merge.yml and the plugin's scala-steward.yml, as written by ciGenerateGithubWorkflow.
Pin zio-sbt-ci and zio-sbt-githubactions to 0.8.5+3-9742dfda-SNAPSHOT from the Sonatype snapshot repository (the merge commit of zio/zio-sbt#823) instead of a local build. Regenerating the workflows with it gives byte-identical files.
This branch has not been deployed
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.
Draft: uses a zio-sbt snapshot.
project/plugins.sbtandzio-aws-codegen/build.sbtpin0.8.5+3-9742dfda-SNAPSHOT, the merge commit of zio/zio-sbt#823, from the Sonatype snapshot repository. Replace both with the release version once zio-sbt releases it.What
GithubActionsGeneratorand its circe workflow model, and thegenerateCiYamltask.tag,build-core,integration-test,build-clients-N,release) inZioAwsCiand feed them to zio-sbt-ci throughciBuildJobs/ciReleaseJobs.cijob, the workflowpermissionsblock, the concurrency group. The last two settings need zio-sbt#823.zio-scala-stewardGitHub App, and set the auto-approve/auto-merge bots todependabot[bot],renovate[bot]andzio-scala-steward[bot]. These PRs used to come from a personal token.ci.yml, plus newauto-approve.yml,auto-merge.ymland a generatedscala-steward.yml(replaces the hand-written one).Verified
Parsed as YAML, the generated
ci.ymlequals the previous one: same 10 jobs in the same order, same steps, conditions, matrices, services and env. Normalised away:continue-on-error: false,fail-fast: trueandenv: {}, which the plugin spells out and are no-ops. Textually it differs: header comment and no line folding (784 lines vs 1085).This was checked in a scratch sbt build using the snapshot plugin,
ZioAwsCiand the module list from the committedci.yml. The repo's own build was not run: sbt-git fails on the git worktree I worked in, and the loader clones the AWS SDK on every load. So the wiring that fillsZioAwsCodegenPlugin.moduleNamesfrom the loader only compiled and is untested.sbt ciGenerateGithubWorkflowon a normal clone should regenerate the same files.Before merging
SCALA_STEWARD_GITHUB_APP_ID,SCALA_STEWARD_GITHUB_APP_INSTALLATION_ID,SCALA_STEWARD_GITHUB_APP_PRIVATE_KEYavailable (repo or org), and the app installed on this repo. Otherwise the Steward job fails.APP_ID/APP_PRIVATE_KEYforauto-merge.yml, or it falls back toGITHUB_TOKEN, which cannot merge PRs touching.github/workflows/**sbt/setup-sbtfirst and the generated one does not. Watch the first scheduled run.sbt ciGenerateGithubWorkflowon a normal clone leaves no diff