Skip to content

feat(bump-manifest-image): add reusable image-bump PR action#149

Closed
Piotr1215 wants to merge 1 commit into
mainfrom
devops-951/bump-manifest-image-action
Closed

feat(bump-manifest-image): add reusable image-bump PR action#149
Piotr1215 wants to merge 1 commit into
mainfrom
devops-951/bump-manifest-image-action

Conversation

@Piotr1215
Copy link
Copy Markdown
Contributor

What

New composite action bump-manifest-image that opens an image-bump PR for a single environment: parse tag, semver-compare against the current manifest, skip pre-releases for prod, rewrite the image: tag with yq, open a PR via peter-evans/create-pull-request (SHA-pinned), and optionally enable auto-merge.

Why

The infrastructure dispatch receivers (salesforce-actions-server, license-server, and now revops-events-api) each inline ~120 lines of this identical logic. Per the org rule that shared CI logic lives here and callers reuse it, this extracts the flow into one tested action. revops-events-api is the first consumer (infra caller: loft-sh/infrastructure#293); salesforce/license can migrate next.

Structure (follows the auto-approve-bot-prs pattern)

  • src/resolve-version.sh, src/should-update.sh, src/apply-bump.sh — logic
  • test/*.bats (14 tests) + fixture — make test-bump-manifest-image
  • README.md with auto-doc markers, Makefile target, path-filtered CI workflow

Checks

  • make test-bump-manifest-image — 14/14 pass
  • make check-docs — up to date
  • make lint (actionlint + zizmor) — no findings

Follow-up

On merge, tag bump-manifest-image/v1 so consumers can pin @bump-manifest-image/v1. The infra PR references that tag and is blocked until it exists.

References DEVOPS-951

The infrastructure repo's dispatch receivers (salesforce-actions-server,
license-server, and now revops-events-api) each inline ~120 lines of the same
logic: parse a release tag, semver-compare against the current manifest, skip
pre-releases for prod, rewrite the image tag, open a PR, optionally auto-merge.
That duplication is exactly what this repo exists to absorb — shared CI logic
belongs here, with callers reusing it rather than hand-rolling shell in every
workflow.

Extract the flow into a single composite action with the logic in tested
src/*.sh scripts (bats), a third-party pin on create-pull-request, and the
standard README/Makefile/CI wiring. revops-events-api is the first consumer;
the salesforce/license receivers can migrate onto it next.

The auto-merge step authenticates with the caller-supplied PAT, not
GITHUB_TOKEN, so the merge event still triggers downstream workflows (e.g. a
deploy notification) — a GITHUB_TOKEN merge would emit no events.

References DEVOPS-951
@Piotr1215
Copy link
Copy Markdown
Contributor Author

Closing — bump-manifest-image is the wrong abstraction. The X-release -> Y-PR pattern is already covered by the repository-dispatch action, and the target repo should compose existing reusable actions (semver-validation, peter-evans) rather than a new bespoke action. Reworking infra to do that.

@Piotr1215 Piotr1215 closed this May 29, 2026
@Piotr1215 Piotr1215 deleted the devops-951/bump-manifest-image-action branch May 29, 2026 12:57
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