Setup Java GitHub Workflows
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffold or update the develop.yml, main.yml, sync.yml, and security.yml GitHub Actions workflows
(plus the companion .github/scripts/sync_versions.py script and .github/dependabot.yml) that make up a
Java/Maven library’s CI/CD release and security pipeline.
Purpose
iru-setup-java-github-workflows wires up the full house pipeline for a Java/Maven repository: build and test,
Checkstyle/PMD/SpotBugs static analysis, JaCoCo coverage and a Maven site report, an optional
SonarQube/SonarCloud scan (gated by sonar), an Antora documentation build, publishing both the Antora docs
and the Maven site report to GitHub Pages (or, with pages: no, uploading them as a workflow artifact instead), and an optional publish of the release artifact to Maven Central
(gated by publish, along with its setup-java signing inputs and mvnsettings.xml). develop.yml runs this
pipeline on every push to the integration branch; main.yml runs the same pipeline when a GitHub Release is
published; sync.yml triggers on that same release-published event to open a pull request merging the
released branch back into the integration branch and bumping the development snapshot version across
pom.xml, README.md, and the Antora docs, via sync_versions.py. security.yml runs a
dependency-review/CodeQL/OSV-Scanner/gitleaks block on every pull request and push to the integration/stable
branches, each job individually gated by its own security-* argument (default yes); .github/dependabot.yml
(grouped weekly updates for maven and github-actions) is always generated with no opt-out. The skill ships
generic, genericized example templates (derived from a real repository’s workflows) embedded in the skill file
itself, and resolves every placeholder in them from a survey of the target repository rather than guessing. If
any of the workflow files already exist, it announces that it is updating rather than creating from scratch, warns,
names each contradiction between the existing file and this run’s choices, and asks per existing unit whether to
Update (merge using the templates as reference, preserving any step this skill doesn’t own such as a Slack
notification, with a diff shown first), Keep as is, Replace from the template, or Stop (offered once, in the first
question) — unless on-existing decides for every unit.
Cost-aware choices are resolved before generating anything: visibility (detected via gh repo view or asked;
public repositories use free standard GitHub-hosted runners, private/internal ones consume included Actions
minutes — 2,000/month on Free, 3,000 on Pro and Team, 50,000 on Enterprise Cloud, per GitHub’s current pricing),
sonar (SonarCloud recommended only for a public open-source repository), ci-tests (unit adds -DskipITs to the
test run), and pages (default yes for public; for private it is asked, with no recommended because Pages needs a
paid plan and the site is public).
Plugin
Shipped by the iru-java plugin of the ai-catalog marketplace (install with /plugin install iru-java@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Pre-resolved values for the six pipeline parameters — |
None — if |
Outputs
-
.github/workflows/develop.yml,.github/workflows/main.yml,.github/workflows/sync.yml, and.github/workflows/security.yml— each unit created fresh, updated in place (merged, diff shown first), replaced from the template, or left as is, per the Step 2 choice for any that already existed. The Maven Central deploy step and itssetup-javasigning inputs indevelop.yml/main.ymlare generated only whenpublish: yes; the SonarCloud analysis step only whensonarisn’tnone;-DskipITsis appended to the test run only whenci-tests: unit; and the GitHub Pages deploy step is replaced by anUpload documentationworkflow-artifact step whenpages: no(the Antora build and docs merge stay either way). -
.github/scripts/sync_versions.py, always written together withsync.yml— never one without the other. -
.github/dependabot.yml— grouped weekly updates for themavenandgithub-actionsecosystems, always generated/updated regardless of thesecurity-*args. -
Supporting files created if missing:
sonar.*properties and thesonar-maven-pluginadded topom.xml(only whensonarisn’tnone), the Maven settings file used for deploy — defaultmvnsettings.xml— (only whenpublish: yes), plus.gitignoreentries for/docs/build/and/target/if absent. -
A report stating whether the pipeline was created from scratch or updated, the per-unit action (created / updated / replaced / kept as is with each mismatch listed / stopped; user answer or
on-existing), the wiring decisions forpublish,sonar,visibility(with the Actions-minutes note for private/internal),ci-tests,pages, and the security block, the required repository secrets and the repository setting that must be enabled forsync.ymlto be able to open pull requests, plus any open gaps (missing Central plugin, missing signing profile, missing Antora setup, README/Antora wording that didn’t match `sync_versions.py’s default regexes).
| Secret | Purpose | Only needed when |
|---|---|---|
|
Auth token for the SonarQube/SonarCloud scan, passed as |
|
|
Maven Central (Sonatype) publishing credentials |
|
|
GPG private key, its key id, and its passphrase, for artifact signing |
|
|
Only needed with the legacy |
|
None of security.yml’s four jobs need a secret beyond the automatically provided `GITHUB_TOKEN.
The generated files' bytes come from template files under templates/ (and, where a template needs variant-specific notes, reference/) in .claude/skills/iru-setup-java-github-workflows/; the skill reads only the files for the variant it resolved, not the whole set, which keeps its SKILL.md small.
Execution flow
Dependencies
Invokes
None — iru-setup-java-github-workflows is a leaf skill; it does not call any other skill in this catalog.
Invoked by
-
Setup Java Library Repository — Step 6 runs
iru-setup-java-github-workflows(via theiru-isolated-skill-executoragent), passing the six pipeline parameters (integration branch, Java version, publishing server id, extras/sign profile ids, settings file) from its own Step 2, plusgroupId/artifactIdfrom its own Step 1,open-source/publish/sonar(+ detail keys),visibility,ci-tests,pages,mode, and (when supplied)on-existing, throughargsaskey: valuelines so it isn’t asked — or made to re-readpom.xml— for facts the orchestrator already has. The step is skipped entirely when the orchestrator resolvedci: no.
Source
SKILL.md on GitHub — the file this page was generated from.