Repository navigation
ci: use the shared Aam-Digital CI workflows - #4507
Conversation
- image build: _build.yaml keeps the web app build and calls the shared docker-image workflow (Docker Hub + ghcr.io). PR images are linux/amd64 only and the image of a previous push is deleted when it is replaced. - releases: shared release workflow in manual mode. Master pushes create X.Y.Z-edge.N prereleases (formerly -master.N), create-release.yml the full release. Images are built on `release: published`, tagged `stable`/`latest` from the release's prerelease flag; prereleases get `edge` and, during the transition, `master`. Old prerelease images are pruned from ghcr.io after a full release. - PR close: shared pr-image-cleanup (cancels running PR builds first), then deployment removal, Docker Hub tag and cache deletion. - Node.js version from .nvmrc, npm version from packageManager (replaces _node-toolchain.yml). - PR title lint and actionlint via the shared workflows. Part of Aam-Digital/internal#392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Node.js version is now read from .nvmrc (nvm manager), so the custom regex manager for _node-toolchain.yml is no longer needed. Part of Aam-Digital/internal#392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They are now provided for all repositories by Aam-Digital/.github. CONTRIBUTING.md and the PR template stay, as they are specific to this repository. Part of Aam-Digital/internal#392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Deployed to https://pr-4507.aam-digital.net/ |
| # skipped for prereleases (e.g. -edge.n) | ||
| if: ${{ !github.event.release.prerelease }} | ||
| run: | | ||
| npm install -g @sentry/cli |
| # skipped for prereleases (e.g. -edge.n) | ||
| if: ${{ !github.event.release.prerelease }} | ||
| run: | | ||
| npm install -g @sentry/cli |
| # skipped for prereleases (e.g. -edge.n) | ||
| if: ${{ !github.event.release.prerelease }} | ||
| run: | | ||
| npm install -g @sentry/cli |
| # skipped for prereleases (e.g. -edge.n) | ||
| if: ${{ !github.event.release.prerelease }} | ||
| run: | | ||
| npm install -g @sentry/cli |
|
|
||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| actions: write # required for cancelling PR builds and deleting GitHub Actions caches |
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| actions: write # required for cancelling PR builds and deleting GitHub Actions caches | ||
| packages: write # required for deleting GHCR images |
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write # required for pushing to ghcr.io |
The build name is passed to _build.yaml as an input. Part of Aam-Digital/internal#392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR image check (registry API)1st push (
2nd push ( All three package versions now return 404 from the packages API. Check names as reported: |
Part of Aam-Digital/internal#392 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The shared docker-image workflow no longer deletes replaced images itself; pr-image-cleanup now deletes untagged images older than 2 days (Aam-Digital/.github#1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moved here from the shared preset's README (Aam-Digital/.github#1), since it only concerns this repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prereleases Uses the shared edge-version workflow (Aam-Digital/.github#1): version <last release, patch + 1>-edge.<commits since>, tagged `edge` too while it is the newest commit. Edge images of a finished cycle are pruned after the next full release. The shared release workflow no longer takes `type`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`secrets: inherit` is flagged by zizmor (blocking in qlty check). _build.yaml and i18n-publish-translations.yml now declare the secrets they read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…HA_7 The workflow_dispatch input only selects which version's translations are re-published; it is validated and affects no build output. qlty reported it because the file changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ombined image-cleanup.yml) - image-prune.yml and pr-image-cleanup.yml are now one image-cleanup.yml (`tags` instead of `tag-patterns`; callers grant `actions: write` too). - docker-image.yml builds every platform on a native runner: check names are now `<job> / build (<platform>)` and `<job> / merge`, and the `native-runners` input is gone. - The `org.opencontainers.image.version` label of PR images is set by the shared workflow from the first tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps ndb-core's own issue templates (updated on master in #4529) instead of the org defaults, and carries master's Node.js 24.22.0 update over into .nvmrc.
Aam-Digital/.github#1 is merged and tagged `v1`; its branch is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tdated CI flow diagram - The jobs sentry-upload-sourcemaps and sentry-release become one job `sentry-release`. It installs the @sentry/cli version from package-lock.json (the one the build injects the debug IDs with) with --ignore-scripts, instead of the latest version with install scripts (SonarCloud findings from #4507), then creates the release and uploads the sourcemaps. - Full releases only, by a job-level `if`: a step-level `if` reported a green job for an upload that never ran, which hid failing uploads before. - .github/ci-cd-flow.drawio.png showed the CI flow before the shared workflows and is not referenced anywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 4.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Moves ndb-core's CI onto the shared reusable workflows in
Aam-Digital/.github(Aam-Digital/.github#1). Aam-Digital/.github#1 is merged and taggedv1; everyuses:of a shared workflow points at@v1.Changes
_build.yamlkeeps the web app job. The image is built by the shareddocker-image.yml(aamdigital/ndb-serveron Docker Hub andghcr.io/aam-digital/ndb-core, OCI labels, GHA cache,SOURCE_DATE_EPOCH=0passed as build-arg).pr-<n>only,linux/amd64only (previously amd64 + arm64). The version label ispr-<n>(set by the shared workflow from the first tag), so_build.yamlhas nolabelsinput any more.ubuntu-24.04-arm, no QEMU), then merged into one multi-platform image per registry.image-cleanup.yml(on PR close and after releases) deletes untagged images older than 2 days (feat: shared CI workflows, release automation, Renovate presets and org defaults .github#1).on-master-push.yml, replaces the-master.Nprereleases): every master push, afterqaandqa-e2e, is built asX.Y.Z-edge.N= the last release with the patch number bumped, plus the commits since (e.g.3.93.1-edge.39; sharededge-version.yml). There is no git tag and no GitHub release for it, so noGH_TOKENon master pushes.<version>, plusedgeandmaster(transition, see below) while it is the newest master commit. A newer push cancels an older edge build (concurrency), soedgenever moves back.i18n-publish-translations.ymlis now also callable (workflow_call) and publisheslocale/<edge version>without touchinglocale/latest, so new texts can be checked on edge before a release. The existing cleanup at the next full release removes these folders. Its version step now readsinputs.versionfirst: underworkflow_call,github.event_nameispush.release.yml, manual mode:create-release.yml→ full release (the local prerelease cleanup job is gone)..releaserc; the extra plugins and the Slack webhook are passed as before..releaserc: removedbranches. The shared workflow always passes its ownbranches, so this block (including the staleofficial-releasebranch) was dead config.tag-published.yml→release-published.yml, triggered onrelease: publishedinstead of tag pushes.stable/latestare set from the release's prerelease flag, not from a-in the tag name.image-cleanup.yml(tags: "*-edge.*,*-master.*") deletes the old edge images from ghcr.io, then the untagged images older than 2 days. Images still taggededge,master,stableorlatestare kept. Docker Hub is not covered.i18n-publish-translations.ymlalready ran onrelease: publishedand is unchanged.image-cleanup.ymlruns first. It cancels any runningpull-request-updated.ymlbuild of the PR, waits for it, then deletespr-<n>from ghcr.io with all pages read and the manifests handled./v2/auth/tokenlogin from fix(ci): reliably delete PR images when a PR is closed #4505), and deletes the GHA caches. It runs even if the image cleanup failed..nvmrc(24.22.0) and"packageManager": "npm@12.2.0"replace_node-toolchain.yml. All jobs usesetup-nodewithnode-version-file: .nvmrcand install the npm frompackageManager.pr-title-lint.ymland the newactionlint.ymlcall the shared workflows. The actionlint step inqa / code-qualityis removed; the job stays._node-toolchain.ymlis no longer needed, andnvmis added toenabledManagers.Final Reviewlabels,ignoreDepsand the additional reviewer are kept.SECURITY.md, which now comes from the org defaults. ndb-core keeps its own.github/ISSUE_TEMPLATE/(updated in chore: update agent instructions and process templates #4529, used by thefeature-use-casesskill),CONTRIBUTING.mdand the PR template.build/README.md,CONTRIBUTING.md,README.md(Node version).master)Observed on this PR (exact names):
build / build-image(required)build / build-image / build (linux/amd64)build / toolchain,qa / toolchain,qa-e2e / toolchainbuild / build-image / merge(skipped for fork PRs, so never make it required)Expected after merge (not observable on a PR:
pull_request_targetruns the base branch's workflow, so this PR still shows the oldValidate PR title):Validate PR title(not required)pr-title / Validate PR titleqa / code-qualityactionlint / actionlintUnchanged and required:
qa / test-unit,qa / code-quality,qa-e2e / test-e2e,deploy,CodeRabbit.Suggested ruleset: replace
build / build-imagewithbuild / build-image / build (linux/amd64), and addactionlint / actionlint(linting is no longer part of the requiredqa / code-quality) andpr-title / Validate PR title.Switch the ruleset right when this merges, then update open PRs: PRs that branched from the old master keep reporting
build / build-imageand would block on the new name.Edge transition (from #4506)
X.Y.Z-edge.N. Its image is tagged<version>,edgeandmaster.The 22 existing
-master.NGitHub prereleases and their tags are deleted once by hand (one-time command in internal#392); nothing creates new ones.:masterto:edge(infra repo).mastertag here (edge,master→edgeinon-master-push.yml). The shared workflows keep matching*-master.*for the cleanup.Semver ordering:
3.93.1-edge.Nsorts below the old3.94.0-master.N. semantic-release is not affected, because a release branch ignores prerelease tags. Anything that picks images by highest semver instead of a fixed tag would prefer the old-master.Nimages until they are deleted at the next full release.Behaviour changes to be aware of
masterbuilds an edge image (and publishes its translations, redeploys the preview), includingchore/docspushes and pushes right after a release. Before, prereleases were only made for releasable commits. Wanted: Renovate'schore(deps)merges reach the preview instance before the next full release.image-cleanup.ymlcovers ghcr.io only), and there is now one per master push.Testing
actionlint1.7.12 with shellcheck 0.11.0: clean. It was also run against local copies of the shared workflows, so the inputs, secrets and permissions of every call are checked.renovate-config-validator --strict(Renovate 44): valid. The local validator does not resolve thelocal>Aam-Digital/.github//…presets. They resolve only once feat: shared CI workflows, release automation, Renovate presets and org defaults .github#1 is on its default branch.cleanup-replacedresult there is outdated: that step was replaced by the PR-close sweep.)pull_request_target(PR title lint, PR close cleanup; they run the base branch's version), the edge build on master push (version, tags, edge translations),create-release.yml,release-published.yml(image tags, prune, Sentry) and i18n publishing. Check the first master push and the first full release after merging.PR Checklist
Before you request a manual PR review from someone, please go through all of this list:
--> then mark the PR "Ready for Review"
🤖 Generated with Claude Code