Skip to content

ci: auto-pin active ePHPm image tags to the latest published release - #8

Open
luthermonson wants to merge 1 commit into
mainfrom
feat/auto-pin-ephpm
Open

luthermonson wants to merge 1 commit into
mainfrom
feat/auto-pin-ephpm

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

What

Adds a scheduled GitHub Actions workflow that keeps the lab's active ePHPm image pins tracking the latest published ephpm/ephpm version, opening a PR when a newer version appears — without ever touching the historical suites. All rules are deterministic; no per-run judgement.

The moving parts

File Role
.github/ephpm-active-pins.txt Deterministic manifest — the single source of truth for which files (and which shell variables: IMG, CURRENT_IMAGE) are active. Anything not listed is never modified.
.github/scripts/bump-ephpm-pin.sh Standalone bump script--dry-run, --version X.Y.Z, --print-version. Idempotent. Preserves each pin's -php<minor> suffix and byte-exact line endings (perl). Skips any line containing HISTORICAL_IMAGE or the marker ephpm-pin:historical.
.github/workflows/pin-ephpm.yml The workflowschedule (daily 06:17 UTC) + workflow_dispatch (optional version) + repository_dispatch (types: [ephpm-released]). Uses the built-in GITHUB_TOKEN (runs in-repo).
.github/AUTO-PIN.md How it works + the optional repository_dispatch immediacy add-on.

"Latest" comes from Docker Hub, not GitHub Releases

The dind CI bug means images can publish without a Release, so Releases are unreliable. "Latest" = the newest semver tag on Docker Hub for which both -php8.4 and -php8.5 variants exist (k8s pins are php8.4; the DB cluster suite is php8.5).

Active (bumped) vs historical (never touched)

Active: the 12 k8s image pins in k8s/*.yaml (php8.4); IMG in db/bench-cluster.sh and CURRENT_IMAGE in scripts/run-db-bench.sh (php8.5); "current pin" prose in README.md, RUNTIMES-BENCH.md, k8s/OPCACHE-CLUSTER.md.

Never touched: pre-v0.7.0 rusqlite/sqld scripts (db/bench-{engines,proxy,bridge,wordpress-bridge,admission}.sh, db/probe-*.sh); scripts/run-db-bench.sh's HISTORICAL_IMAGE (protected two ways — not the named var, plus the HISTORICAL_IMAGE skip guard); recorded-result markdown (DB-BENCH.md, docs/*, scale/reports/*); rr/Dockerfile.

Verification (deterministic proofs)

Idempotencebump-ephpm-pin.sh --dry-run at the current state:

Latest published version (both -php8.4 and -php8.5 present): v0.10.8
----------------------------------------------------------------
already at v0.10.8, no changes

Correct scoping--dry-run --version 0.99.9 bumps exactly 12 files (12 k8s image pins + both cluster IMG/CURRENT_IMAGE + current-pin prose), and a real run confirmed via git diff that HISTORICAL_IMAGE stays v0.6.3-php8.5, README's historical v0.6.3 prose is intact, and the pre-v0.7.0 scripts, .md records, and rr/Dockerfile are untouched.

actionlint on the workflow: clean. bash -n on the script: clean.

Review, not auto-merge

Opens a PR for review rather than auto-merging — the active/historical distinction and bench-pin changes deserve a glance. AUTO-PIN.md documents how to enable auto-merge later. peter-evans/create-pull-request is pinned by commit SHA (22a9089 = v7.0.11) for supply-chain hygiene.

Optional immediacy add-on

Wiring ephpm/ephpm's release to send a repository_dispatch (needs a lab-write token secret over there) would pin instantly; the scheduled poll already covers it with zero extra auth. That change is not made here.

Add a scheduled workflow that keeps the lab's ACTIVE ePHPm pins tracking
the newest published ephpm/ephpm version, opening a PR when one appears,
without ever touching the historical suites.

- .github/ephpm-active-pins.txt: deterministic manifest enumerating exactly
  the active files + shell variables (IMG, CURRENT_IMAGE). Anything not
  listed is never modified.
- .github/scripts/bump-ephpm-pin.sh: standalone bump script with --dry-run,
  --version X.Y.Z and --print-version. Latest is resolved from Docker Hub
  (newest semver with both -php8.4 and -php8.5 variants) — not GitHub
  Releases, which the dind CI bug makes unreliable. Idempotent. Preserves
  each pin's -php<minor> suffix and byte-exact line endings (perl). Skips any
  line containing HISTORICAL_IMAGE or the marker `ephpm-pin:historical`.
- .github/workflows/pin-ephpm.yml: schedule (daily 06:17 UTC) +
  workflow_dispatch + repository_dispatch(ephpm-released); opens/updates a PR
  via peter-evans/create-pull-request pinned by SHA (v7.0.11). Review, not
  auto-merge.
- .github/AUTO-PIN.md: how it works + the optional repository_dispatch
  immediacy add-on (needs a lab-write token in ephpm/ephpm; the poll covers
  it with zero extra auth).
@ephpm

ephpm Bot commented Sep 16, 2026

Copy link
Copy Markdown

ePHPm Preview — deployed (health check pending)

URL https://ephpm-lab-pr-8.preview.ephpm.dev
Framework PHP
PHP 8.5
Deployed in 61.0s

Preview updates automatically on each push to this PR.

@ephpm

ephpm Bot commented Sep 16, 2026

Copy link
Copy Markdown

ePHPm Preview — deployed (health check pending)

URL https://ephpm-lab-pr-8.preview.ephpm.dev
Framework PHP
PHP 8.5
Deployed in 61.2s

Preview updates automatically on each push to this PR.

@ephpm
ephpm Bot temporarily deployed to preview-pr-8 September 16, 2026 03:50 Inactive
@ephpm
ephpm Bot temporarily deployed to preview-pr-8 September 16, 2026 03:50 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant