ci: tag static builder images with the release version (#2758)
The v1.13.3 release ([run
39954802534](https://github.com/php/frankenphp/actions/runs/39954802534))
pushed only `static-builder-{musl,gnu}` and
`static-builder-{musl,gnu}-sha-ae3d5b9`. It never pushed
`static-builder-{musl,gnu}-1.13.3`, `-1.13` or `-1`. Until now those
tags have only shown up at the next nightly run.
- The `prepare` job only resolves the version on `schedule`, so on a tag
it ran `docker buildx bake --print` with `VERSION: dev`, and the
manifest tag list had no semver tags. It now uses the tag name when the
ref is a tag, the same way `docker.yaml` already does.
- "Inspect GNU image" added `-gnu` to a tag that already ends in `gnu`,
so it inspected a stale `static-builder-gnu-gnu` image (last updated
2025-03-28) rather than the one just pushed, and passed. The extra
suffix is removed.
Tested on a fork with a dispatch on a throwaway `v9.9.9` tag: `prepare`
gets `VERSION: v9.9.9`, and with the same inputs `bake --print` gives
`static-builder-gnu`, `-gnu-9`, `-gnu-9.9` and `-gnu-9.9.9` (the same
for musl). The `push` job was not run.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: TJ Striker <trevor@ferre.us>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>