Introducing a new way to review your PRs.

Read the announcement

frappe / frappe_docker

Docker environment for developing, deploying, and running Frappe applications (ERPNext and custom apps) in production and development

View on GitHub

15 documents · Updated Nov 23, 2026

docs / repository-quality-automation

Repository quality automation

Repository quality automation uses GitHub Actions to check changes, keep development tools current, manage inactive work items, and publish the documentation site. The checks protect the main branch while scheduled jobs keep images, dependencies, hooks, and public documentation aligned with the supported project state.

Continuous integration checks

Change-aware validation

The main quality checks run for pull requests and pushes to main. Image and benchmark workflows use path filters so that a change receives the checks that can affect it. The lint workflow runs for every pull request and push to main without an input path filter.

The repository also supports manual runs and scheduled validation for work that can become stale outside a pull request. Stable builds can also start from release events in the source repositories. Small legacy workflow names delegate to the core develop and stable workflows, so manual users follow the same validation and publication paths. A completed stable pull-request run also starts a report job that updates the matching pull request with build status and measurements.

References: .github/…/lint.yml• L3-10 .github/…/core-build-stable.yml• L9-63 .github/…/core-build-develop.yml• L9-43 .github/…/core-build-bench.yml• L3-16 .github/…/build_develop.yml• L3-21 .github/…/build_stable.yml• L3-21 .github/…/core-report-pr-build.yml• L3-30

Container validation

The container pipeline resolves the framework and application versions before it builds images. It compares image sizes with a successful main-branch baseline, builds the result for amd64 and arm64, scans the images for high and critical fixed vulnerabilities, and runs the repository test suite for each platform. The integration test suite page explains the test behavior.

Scan reports remain available as artifacts and appear in pull request summaries. Scan findings do not fail the image gate by themselves. A failed build, size check, or test stops the later publish step. The stable pull-request report adds build status, build time, image sizes, and baseline changes to the pull request after the workflow completes.

Stable and develop pipelines reuse this validation as their gate. A successful non-pull-request run in the canonical repository can publish images to Docker Hub and base images to GHCR. Stable validation covers release lines 15 and 16, then can refresh the example version files, password file, and Helm release. Develop validation publishes the develop image path. Manual runs on main can explicitly accept image growth when a size increase is intentional. The image build and publish automation page gives the broader image release view.

The relationship between validation, pull request reporting, and publication is shown below.

flowchart LR
    A[Change, release event, or scheduled run] --> B[Resolve versions and baseline]
    B --> C[Build images for supported platforms]
    C --> D[Check sizes, scan images, and run tests]
    D -->|pass on an eligible non-PR run| E[Publish images]
    E --> F[Refresh example versions]
    E --> G[Release Helm chart]
    D -->|pull request| H[Report status, time, and size in PR]

References: .github/…/core-build-test-images.yml• L49-288 .github/…/core-build-stable.yml• L64-212 .github/…/core-build-develop.yml• L45-67 .github/…/core-report-pr-build.yml• L13-30 .github/…/report_pr_build.py• L153-287 .github/…/core-publish-images.yml• L42-112

Pull request build reporting

The pull request build report turns a completed stable image run into one maintained pull request comment. It matches the run to an open pull request, reads the build jobs and image-size artifacts, and compares current build time and compressed image sizes with a trusted earlier run. A newer run replaces the earlier bot comment instead of adding a new comment.

The report is informational. It does not replace the build gate, and it cannot report a result when the completed run cannot be matched to its pull request or its measurements fail validation.

References: .github/…/core-report-pr-build.yml• L3-30 .github/…/report_pr_build.py• L40-61 .github/…/report_pr_build.py• L153-253 .github/…/report_pr_build.py• L256-287

Application image validation

The reusable application image workflow checks that an application can be installed into the selected framework image before it publishes a final application image. It first builds a local smoke-test image and checks that the framework and application are present. Only then can an eligible run build and push a multi-platform image to its target registry.

References: .github/…/app-build-image.yml• L3-74 .github/…/app-build-image.yml• L76-155 .github/…/app-build-image.yml• L157-189

Benchmark image validation

The benchmark pipeline checks the benchmark image on pull requests and on a daily schedule. It resolves the latest Bench release before the test build. It can publish a tested multi-platform benchmark image only from the canonical repository outside pull-request runs, with software inventory and build provenance attached.

References: .github/…/core-build-bench.yml• L3-16 .github/…/core-build-bench.yml• L18-58 .github/…/core-build-bench.yml• L59-75

Linting and local checks

Pre-commit quality gate

The lint workflow first runs the unit tests for the workflow scripts, then installs the repository's pre-commit tool and runs every configured hook against all files. The same hook set is intended to catch file-shape errors, Python style drift, import order problems, formatting changes, spelling errors, unsafe shell scripts, and container or Compose configuration errors before they enter the main branch.

The hook revisions are declared in the shared configuration so local runs and CI use the same tool releases. The Prettier hook uses the pinned 3.10.1 package release. Prettier and Codespell skip the generated documentation lockfile. Shell formatting needs Go in the CI runner. Container files use Hadolint. Compose changes run validation across every supported override combination.

References: .github/…/lint.yml• L11-38 .pre-commit-config.yaml• L1-81

Dependency and work-item maintenance

Dependency update coverage

Dependabot checks the dependency sources every day, including weekends. It covers the GitHub Actions used by automation, the benchmark image, the Docker Compose proxy images under overrides, root Python tools, the Python tools for the Helm release job, the documentation site's npm dependencies, and the pre-commit hooks.

Minor and patch updates for Actions, root Python tools, the Helm release job, and the documentation site are grouped. Proxy image updates are grouped as one maintenance stream, and pre-commit updates are grouped as another. The benchmark image uses its own update behavior.

Dependency sourceUpdate areaGrouping behavior
GitHub ActionsRepository workflowsMinor and patch updates are grouped
Dockerimages/benchDaily updates
Docker Composeoverrides proxy imagesAllowed proxy images are grouped
pipRepository rootMinor and patch updates are grouped
pip.github/helm-releaseMinor and patch updates are grouped
npmdocs siteMinor and patch updates are grouped
pre-commitRepository rootHook updates are grouped

References: .github/dependabot.yml• L1-108 docs/package.json• L1-20 docs/pnpm-lock.yaml• L1-26 requirements-test.txt• L1

Stale work-item handling

The stale workflow runs every day against issues and pull requests. It marks items with no recent activity and gives the author one week to explain why the item should remain open. The keep-open label exempts issues from stale handling; pull requests do not have that exemption in this workflow.

References: .github/…/stale.yml• L1-19

Documentation site publication

Site build and deployment

The documentation workflow treats the docs tree as a publishable site. It builds the site for documentation changes, changes to its workflow, merge-queue validation, and manual runs. It uses Node.js 24 with pnpm 10.28.2, installs from the locked dependency graph, and runs the docs:build command defined by the site package.

The site toolchain provides the VitePress site, Mermaid diagrams, and generated sidebar navigation. The package contract also pins the minimatch and picomatch versions used by the dependency graph. The lockfile records the same direct dependency versions and overrides, so a frozen install can reproduce the build environment.

Only a push to main or a manual run uploads the built site artifact and deploys it to GitHub Pages. Pull requests therefore verify that the site can build without publishing a preview or changing the public site.

The publication stages are connected as follows.

flowchart LR
    A[Docs change, merge queue, or manual run] --> B[Install locked dependencies]
    B --> C[Build documentation site]
    C -->|push to main or manual run| D[Upload Pages artifact]
    D --> E[Deploy to GitHub Pages]
    C -->|pull request or merge queue| F[Build result only]

Concurrent runs for the same ref are cancelled in favor of the newest run. Deployment has its own Pages concurrency group, which prevents older site releases from overtaking a newer one.

References: .github/…/docs-publish-site.yml• L1-26 .github/…/docs-publish-site.yml• L28-68 .github/…/docs-publish-site.yml• L70-85 docs/package.json• L1-19 docs/pnpm-lock.yaml• L1-26 docs/…/config.mts• L1-33

Change checklist

When these files or sections are changed, remember to consider these:

  • Update the lint runner's language setup when the pre-commit configuration adds or changes a hook that needs another runtime.
  • Keep the Compose validation hook's file scope aligned with the supported Compose inputs. A stale scope can skip validation for a new override or test definition.
  • Keep the image-size policy, baseline artifact selection, and resolved version outputs aligned. A mismatch can compare or publish a different image from the one that was checked.
  • Recheck image and benchmark workflow path filters when their inputs move. A stale filter can make a relevant change skip its quality gate.
  • Preserve the resolved version outputs between the reusable image test workflow and its publish callers. A mismatch can publish a different tag from the one that was tested.
  • Keep the stable release-line job names and image-size artifact names aligned with the pull request report. A mismatch can leave the build unreported or compare the wrong measurement.
  • Keep pull request report matching tied to the source repository, branch, and commit. A loose match can update the wrong pull request.
  • Review Dependabot's ecosystem directory when a dependency source or lockfile moves. The update job follows the configured path rather than repository-wide discovery.
  • Review stale labels and exemption rules together. They define which inactive issues can remain open and do not apply identically to pull requests.
  • Keep documentation publication conditions separate from build conditions. A broader build trigger must not grant publish permissions to pull requests.

Important failure modes

TriggerConsequenceGuard
A pre-commit hook or workflow-script unit test failsThe lint job fails and the change cannot pass the quality gateRun the configured checks before review
A Compose input fails supported-combination validationThe lint job fails even when the changed file is not the validator itselfCheck the supported override combinations before merging Compose changes
An image-size baseline or resolved version is unavailableThe image validation cannot make a trusted comparison or build the requested tagKeep successful main artifacts and version-resolution inputs available
Image build or tests failStable or develop publication does not run because publish waits for validationTreat the resolved versions and test result as one release gate
A vulnerability scan fails to produce a reportThe image gate can still complete, but its security evidence is missingReview scan artifacts and the pull request summary when the scan step reports an error
A relevant image or benchmark file is missing from a workflow path filterA pull request can skip the check that covers the changed inputUpdate path filters when ownership or file locations change
A stable build run cannot be matched to one open pull requestNo build report comment is created or updatedPreserve the source repository, branch, and commit match used by the reporter
A build report artifact is expired, malformed, or from another runThe pull request report omits the affected measurementRetain valid size artifacts and verify their run, release line, and architecture
An application image smoke test failsThe application image is not pushedCheck that the framework and selected application are present in the test image
A docs lockfile does not match package.jsonFrozen dependency install fails, so the site cannot build or deployUpdate the lockfile with the package change
A docs build fails on mainNo Pages artifact is uploaded and the public site is not updated by that runKeep site build success as the required input to deployment
An active item has no activity and lacks keep-openThe daily job marks the issue stale and starts the one-week response windowAdd activity or apply the intended exemption label

Key files

FileWhy to read it
.github/…/lint.ymlShows the repository-wide lint entry point, workflow-script tests, and CI runtime needs
.pre-commit-config.yamlDefines the shared local and CI quality checks
.github/…/core-build-test-images.ymlShows the reusable image validation gate, size checks, security reports, tests, and outputs
.github/…/core-build-stable.ymlConnects stable release-line validation to image publication and follow-up release work
.github/…/core-build-develop.ymlShows the scheduled develop image path
.github/…/core-report-pr-build.ymlStarts the pull request report after a stable build completes
.github/…/report_pr_build.pyBuilds and maintains the pull request summary from jobs and size artifacts
.github/…/core-publish-images.ymlDefines the Docker Hub and GHCR destinations and platform scope for published images
.github/…/app-build-image.ymlDefines application image smoke validation and optional publication
.github/…/core-build-bench.ymlDefines benchmark image validation and publication conditions
.github/…/build_stable.ymlShows the manual stable entry point that delegates to the core workflow
.github/dependabot.ymlMaps dependency managers to update areas, schedules, and grouping rules
.github/…/stale.ymlDefines stale-item timing, labels, messages, and exemptions
.github/…/docs-publish-site.ymlConnects documentation build triggers to GitHub Pages deployment
docs/package.jsonDefines the docs build commands, site tool versions, pnpm version, and dependency overrides
docs/pnpm-lock.yamlReproduces the pinned documentation dependency graph used by the frozen CI install
docs/.vitepress/config.mtsDefines the site identity, base path, and sidebar behavior used by the build