Skip to content

ci: resolve merged PR number with bcgov/actions/image-tracker - #680

Merged
DerekRoberts merged 1 commit into
mainfrom
ci/get-pr-to-image-tracker
Oct 17, 2026
Merged

DerekRoberts merged 1 commit into
mainfrom
ci/get-pr-to-image-tracker

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

merge.yml gets the merged PR number from the retiring bcgov/action-get-pr, and that number is the image tag for the TEST and PROD deploys.

Following the #202 migration guidance, the init job now uses bcgov/actions/image-tracker@79aefe3 (v0.9.0) and keeps its pr output, so needs.init.outputs.pr and every TEST and PROD tag stay the same. To work, image-tracker needs a checkout and packages: read. Nothing else changes, and no versions change.

Tag equivalence

How each one finds the number for a push to main:

  • get-pr: asks the API (/commits/{sha}/pulls).
  • image-tracker: reads (#N) from the squash subject (or the same API), then checks that GHCR has tag N for api, frontend and database. Its pr output is that N.

So the value matches, and image-tracker also fails before deploying if any of the three images is missing.

I ran image-tracker v0.9.0 locally against the last 12 commits on main and compared it with the get-pr API answer. All 12 matched:

Commit get-pr image-tracker
5b72f6e 679 679
cddfd50 678 678
8dcf802 677 677
82de285 675 675
cfb981e 674 674
ef42308 669 669
ff6d162 671 671
65d006c 666 666
2efca63 668 668
edfba10 672 672
835b1f6 667 667
f8cc297 665 665

workflow_dispatch runs on main resolve HEAD the same way.


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@DerekRoberts
DerekRoberts marked this pull request as ready for review October 16, 2026 22:32
Copilot AI balanced review requested due to automatic review settings October 16, 2026 22:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The action’s inputs and permissions match its requirements, and the downstream deployment output remains compatible.

No open issues 🎉

What changed in this PR

Replaces the retiring PR-number lookup action while preserving the image tags used for TEST and PROD deployments.

Changes:

  • Uses image-tracker pinned to v0.9.0 to resolve the PR number and verify all three images.
  • Adds checkout and package-read permission while retaining the existing pr output.
File Description
.github/​workflows/​merge.yml Migrates PR-number resolution to image-tracker with its required setup.

Review effort: Balanced

@DerekRoberts DerekRoberts self-assigned this Oct 16, 2026
@DerekRoberts DerekRoberts moved this to Active in DevOps (NR) Oct 16, 2026
@DerekRoberts
DerekRoberts merged commit 15f1e5a into main Oct 17, 2026
32 checks passed
@DerekRoberts
DerekRoberts deleted the ci/get-pr-to-image-tracker branch October 17, 2026 00:21
@github-project-automation github-project-automation Bot moved this from Active to Done in DevOps (NR) Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants