From a82a05db4c959ac10221e7fefb828545419394cd Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 03:18:40 +0000 Subject: [PATCH] docs: add AGENTS.md for AI agents working on the action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Short Summary (TL;DR) Adds an `AGENTS.md` that points AI agents to DDEV's organization-wide `AGENTS.md`, and adds what is specific to this repository: layout, rules for `action.yml`, how to test, and how releases work. ## The Issue AI agents working here had no repository guidance. They had to guess how to test a composite action that has no local test suite, and that users run from the moving `v1` tag. ## How This PR Solves The Issue - Links the [organization AGENTS.md](https://raw.githubusercontent.com/ddev/.github/main/AGENTS.md) for boundaries, style, branches, commits, PRs and attribution, and states that this file wins where they differ. - Lists the files and what each does. - Sets rules for `action.yml`: keep `@v1` users compatible, document every input in `README.md`, and pass inputs through `env:` rather than `${{ inputs.* }}` in scripts. - Explains that the `tests` workflow is the test, how to run it on a branch with `gh workflow run`, and that Markdown-only changes skip it. - Says how to approach nightly failures, and that agents don't create or move release tags. ## Manual Testing Instructions Read `AGENTS.md` and check each claim against `action.yml`, `.github/workflows/main.yml` and `.github/workflows/update-main-version.yml`. ## Automated Testing Overview This PR changes only Markdown, so the `tests` workflow skips it. ## Release/Deployment Notes `action.yml` on `main` still puts `${{ inputs.* }}` into its scripts. The rule in this file applies to new code. A separate change on `20261122_rfay_head_download_ddev` moves the existing steps to `env:`. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UrTUMwauQvTgWac6bsCPsm --- AGENTS.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..02515f7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,75 @@ +# AGENTS.md + +Guidance for AI agents working on `ddev/github-action-setup-ddev`, the GitHub +Action that installs [DDEV](https://github.com/ddev/ddev) on a runner and +optionally starts a project. Users run it as `ddev/github-action-setup-ddev@v1`. + +DDEV's +[organization-wide patterns](https://raw.githubusercontent.com/ddev/.github/main/AGENTS.md) +cover boundaries, writing style, branches, commits, PRs, and AI attribution. +Read them first. This file adds what is specific to this repository, and +**wins where they differ**. + +Fetch GitHub files through `raw.githubusercontent.com`, not +`github.com/.../blob/...` pages, which wrap the file in markup. + +## Layout + +| Path | What it is | +| --- | --- | +| `action.yml` | The whole action: a composite action of `bash` steps | +| `README.md` | User docs, with one section per input | +| `.github/workflows/main.yml` | The `tests` workflow, which runs the action from `./` | +| `tests/fixtures/ddevProj1/` | The DDEV project that the tests start | +| `.github/workflows/update-main-version.yml` | Moves the `v1` tag when a `v*` release tag is pushed | + +## Changing the action + +- Users pin `@v1`, so every change on `main` reaches them with the next + release. Keep inputs and behavior compatible. A breaking change needs a new + major version, and maintainers decide that. +- Document each new or changed input in `README.md`, with its default and a + short example. +- In `run:` scripts, pass inputs through `env:` and quote the variables. Don't + put `${{ inputs.* }}` inside the script, because the value becomes shell + code. +- Each composite step needs `shell: bash`. +- `version` takes `latest`, `head`, or a release number without the `v`, + such as `1.24.8`. The install step adds the `v` for `install.sh`. + +## Testing + +There is no local test suite. The `tests` workflow is the test. It runs on +pull requests, on pushes to `main`, nightly at 00:00 UTC, and on +`workflow_dispatch`. Its matrix covers `ubuntu-24.04` and `ubuntu-24.04-arm` +with `version` set to `latest`, `head`, and `1.24.8`. + +- Changes that touch only `*.md` files skip the workflow (`paths-ignore`). +- To run it on a pushed branch without a PR: + + ```bash + gh workflow run main.yml -R ddev/github-action-setup-ddev --ref + ``` + +- Before you push, check that `action.yml` still parses: + `yq '.runs.steps[].name' action.yml`. +- When you change what the action installs or starts, add an assertion to + `main.yml`, as the `ddev version` step does for `1.24.8`. +- For a remote shell on the runner, run the workflow by hand with + `debug_enabled` set. It opens an upterm session that only the person who + started the run can join. + +### Nightly failures + +The nightly run often fails for reasons outside this repository, such as a +DDEV `main` build that broke, or a download service that failed. Find the +first error in the failed step's log before you change anything here. Check +whether the same job passed on the previous nights with the same commit. +DDEV maintainers can use `/ddev:ci-failure` from +[ddev/agent-skills](https://github.com/ddev/agent-skills) for this. + +## Releases + +Maintainers release by publishing a GitHub release with a `vX.Y.Z` tag. +`update-main-version.yml` then moves `v1` to that release. Don't create, +move, or delete tags yourself.