Setup Java Spring Boot GitHub Workflows
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Creates the three GitHub Actions workflows a Spring Boot service needs: one that builds, tests, analyses, and publishes documentation; one that deploys; and one that stops or destroys an environment.
Purpose
iru-setup-java-springboot-github-workflows is the service-shaped counterpart to
Setup Java GitHub Workflows. A service is not published to Maven Central and is not
GPG-signed — it is built into a container image and deployed — so the publish, sign, and version-sync stages are
replaced by image build, OpenTofu apply, and teardown. The shared stages (test, analyse, Sonar, Antora, GitHub
Pages) follow the same house pattern, so the two remain recognisably related.
| Workflow | Trigger | Does |
|---|---|---|
|
Push to the integration/main branch, and every pull request |
Build, unit tests (Surefire), Testcontainers integration tests (Failsafe), static analysis, aggregated coverage, Sonar, and — on the main branch only — the Antora site plus the generated OpenAPI, protobuf, GraphQL and AsyncAPI HTML, published to GitHub Pages |
|
|
Build and push the container image, authenticate via keyless OIDC, |
|
|
Scale to zero (the reversible default) or destroy an environment, behind a typed-confirmation check and a protected GitHub Environment |
No credential is ever written into a workflow file: cloud access is keyless via OIDC, and everything else is a
repository or environment secret referenced by name. Where the registry supports it, even the registry credential is
derived from the OIDC session (amazon-ecr-login, gcloud auth configure-docker) rather than stored.
The guards on undeploy.yml are the feature rather than ceremony: stop is the default and is reversible, data-bearing
resources are expected to carry deletion protection so destroy fails on them rather than silently deleting a
production database, and the skill recommends restricting prod to required reviewers plus a deployment branch rule
— and considering omitting prod from the destroy path entirely.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
|
|
No |
|
|
On-disk survey |
Yes |
The workflows must match reality, so the skill reads: the reactor’s modules and the |
None — derived |
Existing workflow files |
No |
If any exists, |
None — user must choose |
Outputs
-
.github/workflows/build.yml— abuildjob (checkout with full history for Sonar blame, JDK with Maven cache,mvn clean verify, the site report, the Sonar scan skipped on fork pull requests, and test reports uploaded even on failure) plus adocsjob gated to main-branch pushes. Thedocsjob generates the Maven site and the OpenAPI/protobuf documentation, then runs the two npm-driven generators as their own steps against the toolchains committed inapis/messaging/docsandapis/graphql-server/docs— validating and rendering the AsyncAPI specification, and rendering the GraphQL SDL through SpectaQL and (optionally) Voyager. It then builds the Antora site and merges everything: a "Merge documentation" step copies the contents of everytarget/generated-docsdirectory in the reactor underdoc/api/, sorest-server/,grpc-server/,graphql-server/andmessaging/land side by side without the workflow needing to know which module produced which. The published result includesdoc/api/messaging/v1/index.htmlanddoc/api/graphql-server/v1/index.htmlwith the Voyager graph beneath it. Both npm generators are skipped in Maven (-Dasyncapi.docs.skip=true -Dgraphql.docs.skip=true) in this job so the work isn’t done twice — thebuildjob’smvn clean verifystill exercises thefrontend-maven-pluginwiring — and each step is guarded byhashFiles(…), so deleting a contract directory doesn’t require a workflow edit. Their loops over-async-api-v.yamland-v.graphqlsmean a new contract version needs no workflow change either.One detail the merge step protects by accident and would break if simplified: Voyager's page loads `voyager.standalone.js` and `voyager.css` by relative path, so those files must travel with `index.html`. Copying whole directories preserves that; copying only `index.html` files would publish a blank graph. * `.github/workflows/deploy.yml` — with `id-token: write`, a concurrency group per environment that never cancels in progress, the GitHub Environment as the approval gate, buildpack image build and push, and `tofu apply` of the previously produced plan file. * `.github/workflows/undeploy.yml` — with the typed-confirmation check, the same concurrency group as `deploy.yml` so the two can never run at once, and separate `stop` and `destroy` paths. * A report including the full table of required repository secrets, environment secrets, environment variables, and GitHub Environments — plus the two settings that are easy to miss: GitHub Pages served from `gh-pages`, and an OIDC trust policy scoped to the repository *and* the environment.
Execution flow
deploy.yml and undeploy.yml are deliberately never triggered as a test. The skill instead recommends a dry run of
build.yml on a throwaway branch, and a first deploy.yml run against dev only, watched to completion.
Dependencies
Invokes
None. It reads springboot-stack.yml and surveys the repository, then writes workflow YAML. It may offer to add the
sonar-maven-plugin and sonar.* properties to the root pom.xml if the survey finds them missing.
Invoked by
-
Setup Java Spring Boot — Step 8, sixth of seven sub-skills, via the
iru-isolated-skill-executoragent. Runs late because it surveys what is actually on disk — the reactor, the Antora setup, and theinfra/envs/directories from Setup Java Spring Boot Platform.
Also runs standalone (/iru-setup-java-springboot-github-workflows).
Related agents
-
iru-gate-runner— spawned in Step 5 to run the workflow’s Maven commands locally first, on the principle that a workflow whose commands were never run locally is a guess.
Source
SKILL.md on GitHub — the file this page was generated from.