Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8b227f7
Scan a clean image build and keep the download progress out of the log
devpro Oct 10, 2026
b087454
Add composite replacements for setup-helm and chart-testing-action
devpro Oct 12, 2026
2e00ae9
Mention IstarCI in the contributing guide
devpro Oct 12, 2026
18e8119
Test the Helm and chart-testing setup actions
devpro Oct 12, 2026
0b202d9
Merge branch 'feature/helm-setup' into feature/scan-output
devpro Oct 12, 2026
4f66299
Test the actions in the checkout, and pass --no-progress to image sca…
devpro Oct 12, 2026
b690506
Use the actions of the checkout when the caller is this repository
devpro Oct 12, 2026
defde40
Run the pipeline with the step conditions kept
devpro Oct 12, 2026
cb6e344
Start MongoDB from its archives without sudo, and let the .NET qualit…
devpro Oct 13, 2026
600c60e
Keep the MongoDB check a block scalar, since a plain one reads its co…
devpro Oct 13, 2026
67a4622
Let the container scan build the base image of the commit first, and …
devpro Oct 15, 2026
9b6399d
Give the Docker socket to the jobs that use it alone, the others keep…
devpro Oct 15, 2026
de4a820
End .istarci.yml with a new line, which the YAML lint asks for
devpro Oct 15, 2026
d691c42
Read the Sonar host, FOSSA switch and test filter from the caller's v…
devpro Oct 16, 2026
6c8d950
Check out the commit under test for the workflow parts when the calle…
devpro Oct 16, 2026
5ac3e23
Indent the C# of the .NET fixture by four, as dotnet format expects
devpro Oct 16, 2026
471e409
Test the actions and workflows statically and in the CI, and fix what…
devpro Oct 19, 2026
483970d
Compare the installed versions once captured, and tell agents that Is…
devpro Oct 19, 2026
433fe62
Move the downloaded tools to their latest release, and pin the commen…
devpro Oct 19, 2026
4ac71c9
Emulate other platforms with QEMU from the Ubuntu archive, pin the .N…
devpro Oct 19, 2026
0e0d0a1
Build arm64 natively on an arm64 runner when the caller names one, an…
devpro Oct 19, 2026
85f8c0b
Read the run id of the build-push test from the expression its tag wa…
devpro Oct 19, 2026
92a1f1e
Run the arm64 build test locally, and read the run id from the runner…
devpro Oct 19, 2026
6bc9d83
Name the jobs a local run leaves to GitHub, and why
devpro Oct 19, 2026
012d11a
Download the arm64 build of each tool on an arm64 runner
devpro Oct 19, 2026
aad82ed
Analyze and inventory the project in the working directory rather tha…
devpro Oct 19, 2026
39c3a1b
Add the git check and Pages workflows, the npm publish, Playwright, T…
devpro Oct 19, 2026
1407a4b
Name the git check test job as the job it calls, under which a local …
devpro Oct 19, 2026
c6d06a6
Compare with the parent commit when the event names no base, as a loc…
devpro Oct 19, 2026
86258d3
Read the inputs of the .NET quality workflow only, the test filter be…
devpro Oct 19, 2026
5f0fa01
Add the Node.js quality and npm publication workflows, for repositori…
devpro Oct 20, 2026
a5c16aa
Publish the npm package in a single step, whose outputs the publicati…
devpro Oct 20, 2026
55f99c3
Cache npm for a site only when it has a lock file, give the site buil…
devpro Oct 20, 2026
f6f0403
Read the coverage of a VSTest run, which writes it in a folder of its…
devpro Oct 20, 2026
000b2c3
Check an npm package with --dry-run when the run holds no credential …
devpro Oct 21, 2026
c507412
Shape the Node.js quality workflow like the .NET one, with a Sonar an…
devpro Oct 21, 2026
c741594
Leave the workflow parts out of the FOSSA analysis and of the SBOM of…
devpro Oct 21, 2026
943c8ad
Build an npm package with the build script of the repository by defau…
devpro Oct 21, 2026
9acdc86
Make the container scan the only judge of a built image: a severity t…
devpro Oct 21, 2026
c95c8fe
Remove the registry login of the container scan, a base image being p…
devpro Oct 21, 2026
1e98f3c
Build images with the BuildKit of the Docker daemon, rather than a bu…
devpro Oct 21, 2026
ffa6737
Run the shell code and shell words of an input from a variable, so th…
devpro Oct 21, 2026
de050e9
Fail the build-push test when an image is left in the daemon, which a…
devpro Oct 21, 2026
f9e4737
Let a sonar-project.properties configure the Sonar analysis, the inpu…
devpro Oct 22, 2026
5f3c0d8
Add actions linting Go code with the Go toolchain and scanning it wit…
devpro Oct 22, 2026
89737d9
Build a site by convention in the Pages workflow when no build comman…
devpro Oct 22, 2026
cf0d1a4
Add an action submitting the pages of a sitemap to IndexNow, with cur…
devpro Oct 22, 2026
bbf341e
Let the quality workflows start the MongoDB version a repository asks…
devpro Oct 22, 2026
3f5c362
Add actions installing kube-linter, kubeconform, helm-unittest, and k…
devpro Oct 22, 2026
13ac7cc
Add actions installing Opengrep, Trivy and CodeQL, each checked again…
devpro Oct 22, 2026
f3e4b2c
Update the action pins, tool defaults and fixture dependencies to the…
devpro Oct 26, 2026
b385f13
Run the Go job of a local run on the SUSE Go image, which carries the…
devpro Oct 26, 2026
9fd8cfe
Add skill adopt workflow parts
devpro Oct 26, 2026
e3e6cd9
Install qemu-user-binfmt in the QEMU setup action where qemu-user-sta…
devpro Oct 26, 2026
83f8489
Pass the Sonar organization to the Sonar test jobs, for them to run a…
devpro Oct 26, 2026
c2bff21
Set the Sonar organization to empty for the local SonarQube of IstarC…
devpro Oct 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .claude/skills/adopt-workflow-parts/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
name: adopt-workflow-parts
description: >
Move a repository's GitHub workflows onto the github-workflow-parts catalog, change the catalog when a repository needs a part it lacks,
and bump consumers to a new catalog commit.
Use when adopting, updating or bumping workflow parts in any repository, or when an IstarCI run of a consumer fails.
---

# Adopt workflow parts

## Goal

The catalog is a high quality set of GitHub parts that pushes best practices into every repository and removes most of their pipeline code.
A consumer workflow is a few `uses:` of reusable workflows with inputs, no hand written tool installs, no action referenced by a version tag.

## Procedure

### Catalog change

1. Start from the closest existing part and verify every claim (a CLI flag, a config file, a release) before stating it.
2. Propose the design: steps, inputs with defaults, and what the change adds or removes.
3. Wait for approval before any edit.
4. Edit, run `test/run_static_checks.sh`, commit, `istarci wait`.
5. The user pushes; consumers reference the pushed SHA only.

### Consumer adoption

1. `git rev-parse --abbrev-ref HEAD`: commit on the current branch, unless it is `main`, where a feature branch comes first.
2. Strip any UTF-8 byte order mark from tracked files and set `.editorconfig` `charset = utf-8-bom` to `utf-8`, in a commit of its own.
3. Replace `.github/workflows` jobs with the reusable workflows, every `uses:` and `workflow-parts-version` on the same full SHA.
4. Change one repository first, show its diff, wait, then do the others.
5. Commit, then `istarci wait`, and fix what fails before moving on.

### Bump pass

1. Replace the old SHA with the new one in every `uses:` and `workflow-parts-version` of each repository.
2. Commit "Use workflow parts *short sha*, ..." stating what the new commit brings, then `istarci wait` repository by repository.
3. A failure from a new check (a vulnerability found by an image scan) is fixed in its own commit, in the same pass.

## Conventions

### Reusable workflows

- A few broad steps driven by conventions:
npm scripts `lint`, `format:check`, `typecheck`, `build`, `test` run with `--if-present`, a Pages build with `npm ci` then `npm run build`.
- Optional parts behind a flag or an input with a default (`mongodb-enabled`, `mongodb-version`, `severity`),
and a single optional `custom-tests` step.
- Never one step running whatever command a caller gives.
- Every shell input reaches the script through `env:`, never `${{ }}` inside `run:`, which is a script injection.
- Tool configuration files of the repository are respected (`sonar-project.properties`, `.trivyignore.yaml`).
- The checkout of the catalog itself is added to `.git/info/exclude`, so linters and scanners of the consumer skip it.
- No test in a publication workflow (`pkg.yml`): quality runs in CI, publication only builds and ships.
- `reusable-dotnet-quality.yml` is an old example, improved alongside rather than copied.

### Supply chain

Safety before convenience, and fewer dependencies over more.

- First-party actions (`actions/*`, `github/*`) pinned by full SHA with a `# vX.Y.Z` inline comment with two spaces before (yamllint).
- No third-party action: a tool is a release binary checked against its SHA256 in a `setup` action, or the runner's OS packages.
- No third-party container image; `ghcr.io/devpro/*` and Docker Hub `devprofr/*` are first party.
- No Dependabot: versions are bumped by hand after checking the release exists.
- Lock files with hashes: `npm ci`, `pip install --require-hashes`, never an unpinned global install.
- A vulnerable image with no fixed release is replaced by a first-party one (`alpine-node` over `node`, an in-suite mailbox over Mailpit)
rather than ignored.
- A Trivy ignore, with a reason and an expiry under a month, is the last resort, for something run unprivileged in tests only.
- An npm `overrides` entry is a last resort too:
only when no release of the parent package, `latest` or `next`, fixes the dependency, and it is reverted once one does.
- Secrets stay secrets, even a low value one such as an IndexNow key in a public repository.

### Versions

- Node.js 24 by default, a library tested on 22, 24 and 26.
- MongoDB 9.0 in Docker Compose files, a single-node replica set `rs0` when the code uses transactions.

## Boundaries

- Azure DevOps and GitLab pipelines are never removed or emptied: the same repositories run on several CI systems.
GitLab gets its own session; only a minimal path fix keeping it working is allowed here.
- Deliberately vulnerable images for security workshops (container-images `tinyfilemanager`, `nextportal`) are left untouched,
neither scanned nor published.
- Commit only when asked, never push, never commit on `main`.
- YAML and Markdown linters are never run by an agent: CI runs them.

## IstarCI

- The daemon runs every commit by itself: after a commit, `istarci wait` only.
- `istarci run <sha>` retries a run that must run again (daemon restart, change to `~/.istarci/config.yml`), never right after a commit.
- A command over the 600 second tool limit is moved to the background, against the foreground rule:
`timeout 590 istarci wait` then call it again while the run is going.
- `.istarci.yml` of a consumer sets the runner image per job (`ghcr.io/devpro/debian-node-playwright` for browser tests),
the jobs needing Docker,
and `skipJobs` for jobs that must never run on the developer machine (kind's privileged node, a QEMU registration in the kernel).
- The global ignores of image scans live in `~/.istarci/config.yml`, each with a reason and an expiry.

## Gotchas

- npm keeps the lock entry of a parent package when an override is added, and may even drop the child:
delete the lock entries of the parent and of the child, then `npm install`, and check `npm ls <child> --all` says `overridden`.
- Use the Node.js of `~/.nvm/versions/node/v24.22.1/bin`: the shell `PATH` may resolve an older, vulnerable one.
- A file starting with a byte order mark breaks some tools,
and `dotnet format` fails every C# file when `.editorconfig` asks for `utf-8-bom` and the files have none.
- `build-push` uses the Docker daemon BuildKit (`--builder default`), with one tag per platform merged by `docker buildx imagetools create`,
as a `docker-container` builder cannot see images of the daemon.
- Trivy scans Java dependencies with `--offline-scan`, or it calls Maven Central for each one.
- CodeQL needs more memory than the default on large code bases, and its .NET extractor needs ICU.
- Python scanners reading non-ASCII sources need `PYTHONUTF8=1` in a container whose locale is not UTF-8.
- Playwright tests are found through `node_modules/.bin/playwright` of the root only, not of a workspace.
- A Sonar scan without `sonar-host-url` targets SonarCloud.

## Commits

- One sentence saying why, in the writing style of `AGENTS.md`: no em dash, no second person, the why timeless.
- Script files `snake_case`, committed with the executable bit (`git update-index --chmod=+x`).
- The final report lists each repository, branch, commit and run result, and what is left to the user (pushes, secrets, a first publication run).
Loading
Loading