Setup Android GitHub Workflows
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffold or update the GitHub Actions CI/CD and security workflows, plus a Dependabot config, for an
Android/Gradle repository produced by iru-setup-android-library or iru-setup-android-app.
Purpose
iru-setup-android-github-workflows wires up the house CI/CD pipeline for an Android/Gradle repository: build
and unit test, an optional instrumented test on a reactivecircus/android-emulator-runner emulator, lint with
SARIF upload, unit-test coverage via AGP’s own createDebugUnitTestCoverageReport task (with a vendored-
jacococli.jar fallback), an optional SonarQube/SonarCloud scan, a Dokka + Antora documentation build
published to GitHub Pages (library flavor; with pages: no the docs are still built but only uploaded as a workflow
artifact), and — depending on flavor — either an optional Maven Central
publish or a signed release build uploaded to Google Play or Firebase App Distribution. It also generates a
security.yml (dependency-review, CodeQL, OSV-Scanner, gitleaks, plus two opt-in jobs) and
.github/dependabot.yml, regardless of branching model. The skill supports two branching shapes —
gitflow (develop.yml/main.yml/sync.yml) and main-only (main.yml/publish.yml, no sync.yml) — and
two flavors (library/app), ships genericized example templates derived from a real Android library
repository’s actual workflows, and resolves every placeholder from a survey of the target repository rather
than guessing. It announces whether it is creating the pipeline from scratch or updating an existing one; for each
pre-existing workflow file it compares the file with this run’s choices, names every concrete mismatch (for example
an emulator step with ci-tests: unit, or a Pages deploy with pages: no), and asks Update / Keep as is / Replace
(Stop on the first question), preserving any step/job this skill doesn’t own on Update. Standalone, it also
resolves visibility, sonar, ci-tests and pages with cost-aware recommendations for private repositories
(GitHub Actions minutes, SonarCloud pricing, GitHub Pages availability). There is no ci key: invoking the skill
means CI is wanted. Every build job also ends with an Upload UI screenshots step (actions/upload-artifact,
if: always(), 7-day retention) that attaches the .ui-screenshots/ captures of the catalog’s UI contract as a
ui-screenshots workflow artifact — evidence only, nothing is published (see
Building user interfaces). When the repository’s .ui-quality.yml sets
accessibility: none, no accessibility report artifact, upload or accessibility-only job/step is generated (the UI test
run and screenshot upload are unaffected).
Plugin
Shipped by the iru-android plugin of the ai-catalog marketplace (install with /plugin install iru-android@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Pre-resolved values, one per line, e.g. |
None — if |
Outputs
Which files are written depends on branching × flavor:
branching × flavor |
Files written |
|---|---|
|
|
|
Same six files (the release job inside |
|
|
|
Same four files (the release job inside |
-
Every file above is created fresh when absent. When it already existed, it is updated in place (merged, preserving any step/job this skill doesn’t own), replaced with the template, or left as is, per the user’s answer or
on-existing(Step 1); choosing Stop writes nothing. Per file, the report states the action taken (created / updated / replaced / kept as is) and, for a kept file, each mismatch with this run’s choices. -
In every workflow’s
buildjob, anUpload UI screenshotsstep (ui-screenshotsartifact, 7-day retention,if-no-files-found: ignore) covering the repository-root.ui-screenshots/and, with instrumented tests, each module’sconnected_android_test_additional_outputcaptures; no extra job or runner is added. -
With
pages: nothe librarybuildjob uploads the built Dokka + Antora site as adocs-siteworkflow artifact (actions/upload-artifact) instead of the Pages artifact, and nodeploy-docsjob or Pages permissions are generated. Withci-tests: unitthe emulator and KVM steps are omitted. -
A report of required repository secrets and settings — see the table below — plus any open gaps found along the way (missing
docs/antora.yml, a Gradle Play Publisher plugin found and preferred over the workflow-level upload action, README/Antora wording that didn’t matchsync_versions.py’s regexes, a vendored `jacococli.jarfound and used instead of the AGP-path default).
Required secrets (only the rows that apply to what was actually generated need to be created):
| Secret | Purpose | Only needed when |
|---|---|---|
|
Auth token for the SonarQube/SonarCloud scan |
|
|
Maven Central Publishing Portal credentials |
|
|
In-memory GPG signing key, its id, and its passphrase, for Vanniktech’s Maven Publish plugin |
|
|
Base64-encoded release keystore, decoded to |
|
|
Exported as |
|
|
Google Play service-account JSON for the workflow-level upload action |
|
|
Firebase App Distribution upload |
|
|
Raises the NVD lookup rate limit for OWASP Dependency-Check (the scan runs without it, just slower) |
|
|
|
Automatic — no setup needed |
sync.yml also needs the repository’s Settings → Actions → General → "Workflow permissions" set to allow
GitHub Actions to create pull requests. With pages: yes, the Pages deploy jobs also need Settings → Pages →
"Build and deployment" → Source set to GitHub Actions (and, for a private/internal repository, a GitHub Pro,
Team or Enterprise Cloud plan; the site is public unless Enterprise Cloud private access control is used); with
pages: no there is no Pages setting to change. These are called out explicitly in the final report since each
fails silently on the first real run without it.
The generated files' bytes come from template files under templates/ (and, where a template needs variant-specific notes, reference/) in .claude/skills/iru-setup-android-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-android-github-workflows is a leaf skill; it does not call any other skill in this catalog.
Invoked by
-
Setup Android Repository — Step 7 runs
iru-setup-android-github-workflows(via theiru-isolated-skill-executoragent), passing the pipeline parameters (flavor, branching, integration/stable branch, Java version, instrumented-test/API-level choice, plus the shared open-source/visibility/ci-tests/pages/publish/distribution/sonar/mode/on-existing/security-* args) throughargsaskey: valuelines so it isn’t asked again for facts the orchestrator already collected.
Source
SKILL.md on GitHub — the file this page was generated from.