Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Dev environment tips

```bash
brew install actionlint yq jq # the only tooling this repo needs
brew install actionlint yq jq pipx # the only tooling this repo needs
```

Nothing to build, no `package.json`, no `node_modules`. Every file here is YAML or Bash.
Expand Down Expand Up @@ -107,16 +107,16 @@ Use `bash -eo pipefail -c`, never bare `bash -c`: `-e` is not inherited, so a ba
- `working-dir` carries three different meanings. On the CI leaves it is a real working directory — tools install and run inside it. On `ci-detect-changes.yml` it is a **path scope**: the diff is always taken from the repository root, then the CSS/JS/PHP lists are filtered and re-rooted, while `total-count`, `ignored-count` and the `gha-*` outputs stay repo-wide. On `cd-github-release.yml` and `cd-wp-org.yml` it is a **path prefix** for source files they read (`changelog-path`, `assets-path`); the deployed files come from the artifact, and `wp-cd.yml` forwards it to both unchanged. `cd-built-branch.yml` scopes per entry in its `targets` JSON array, and `cd-s3.yml` by the artifact it downloads.
- `actions/download-artifact` only sees the current run. Anything consuming a build artifact must run in the same workflow as the `ci-build` job that produced it, wired with `needs:`.
- The default `wp-tooling-ref` SHA is duplicated in `ci-detect-changes.yml`, `wp-ci.yml` and `version-monitor.yml`. Changing one without the others silently splits behaviour across jobs.
- The self-hosted runners are ARC pods on Ubuntu 24.04 x64 with a minimal image, not GitHub's `ubuntu-latest`. They have `git`, `curl`, `jq`, `zip`, `rsync`, `python3`, `gh` and `docker`, but no `yq`, `pip`, `aws` or `svn`, and no Node or PHP until `setup-node`/`setup-php` run. `/usr/local/bin` needs `sudo`, which is passwordless. Install what a step needs, pinned and checksum-verified, as `ci-self-check.yml` does for `actionlint` and `yq` and `cd-s3.yml` does for the AWS CLI. apt's `yq` is kislyuk's jq wrapper, not the mikefarah `yq` this repo uses.
- The self-hosted runners are ARC pods on Ubuntu 24.04 x64 with a minimal image, not GitHub's `ubuntu-latest`. They have `git`, `curl`, `jq`, `zip`, `rsync`, `python3`, `gh` and `docker`, but no Docker Compose v2, `yq`, `pip`, `aws` or `svn`, and no Node or PHP until `setup-node`/`setup-php` run. wp-env needs Compose v2, so jobs that boot wp-env fail on these runners until the image or the workflow provides it. `/usr/local/bin` needs `sudo`, which is passwordless. Install what a step needs, pinned and checksum-verified, as `ci-self-check.yml` does for `actionlint` and `yq` and `cd-s3.yml` does for the AWS CLI. apt's `yq` is kislyuk's jq wrapper, not the mikefarah `yq` this repo uses.
- `actionlint` shells out to whatever `shellcheck` is on `PATH`, and rule behaviour differs between shellcheck releases — a local pass does not guarantee a CI pass. Write shell that is clean on older versions too: prefer `guard || continue` and explicit `if` blocks over `A && B || C`, which SC2015 flags on shellcheck 0.10 and earlier.
- A green `bin/check-workflows.sh` proves input *names* are right, not input *values*. A wrong `build-command` or `artifact-path` only surfaces in a real consumer run.
- `cd-github-release.yml` extracts release notes by matching a version heading in `CHANGELOG.md`, and deliberately fails rather than publishing empty notes. Cut `## Unreleased` to `## vX.Y.Z - YYYY-MM-DD` before tagging.
- Consumers pin `@v1`, never a branch such as `@release/v1.0.0`. A moving ref has already broken real consumer runs mid-change.

## PR instructions

- Task branches `<version>/task/<kebab-slug>` off the active release branch. Never commit to `main`.
- Task branches `<version>/task/<kebab-slug>` off `main`. Never commit to `main` directly.
- [Conventional Commits](https://www.conventionalcommits.org/): `feat(ci): add lint-css workflow`.
- PR title `[<version>] <subject>`, targeting the release branch. Squash merge; release branch → `main` is a merge commit.
- PR title `[<version>] <subject>`, targeting `main`. Squash merge.
- Ensure the Code quality commands pass, the caller example is updated alongside the workflow, and a `CHANGELOG.md` entry is added — see `CONTRIBUTING.md` for the full checklist.
- Ask first before removing or renaming an input, adding a deploy target, or granting a job `contents: write` it does not already need.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ First tagged release. Consumers pin `@v1`.
- Every job runs on `runs-on: [self-hosted]`, per rtCamp's policy for private repositories. A reusable workflow's jobs run in the calling repository, so the caller needs access to the org's self-hosted runner group. `bin/check-workflows.sh` applies the same label allow-list as the org's runner-policy scanner, which stops checking a repository once it is public. These runners do not ship the AWS CLI, so `cd-s3.yml` installs a pinned, checksum-verified one when the runner has none.
- `ci-detect-changes.yml`, and so `wp-ci.yml`, now fetch an explicit `base-ref` before diffing. The CLI diffs an explicit base as-is, and the depth-2 checkout never holds a branch such as `main`, so the diff failed, the CLI reported zero changes, and every downstream job skipped while the run passed green. The step also fails when the CLI reports a failed diff in any mode, instead of passing with nothing checked.
- `ci-test-build-artifact.yml` pins `wp-cli/doctor-command` to 2.3.1. `@stable` resolved to v3.0.0 (released 2026-08-04), which requires wp-cli ^3.0, while the wp-env cli container ships 2.12, so the job failed at the package install for every caller.
- `AGENTS.md` and `CONTRIBUTING.md` now base task branches and pull requests on `main`, add `pipx` to the install line because `pipx run yamllint` needs it, and list Docker Compose v2 as missing on the self-hosted runners.

### Added

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ single job starts. Treat the input surface as stable.
There is nothing to build. Install the linters once:

```bash
brew install actionlint yq jq # or your platform's equivalent
brew install actionlint yq jq pipx # or your platform's equivalent
```

## Before you open a PR
Expand All @@ -48,7 +48,7 @@ caller at your branch.

## Pull request checklist

- [ ] Branch is `<version>/task/<kebab-slug>`, based on the active release branch.
- [ ] Branch is `<version>/task/<kebab-slug>`, based on `main`.
- [ ] The three commands above pass locally.
- [ ] Every new or changed input has a `description:`.
- [ ] `examples/<workflow>.yml` added or updated to match.
Expand Down
Loading