Skip to content

fix(image): skip the ECR lookup when a run only builds - #9

Merged
dennis-tra merged 1 commit into
mainfrom
fix/image-lookup-without-credentials
Nov 11, 2026
Merged

dennis-tra merged 1 commit into
mainfrom
fix/image-lookup-without-credentials

Conversation

@dennis-tra

Copy link
Copy Markdown
Contributor

What and why

image.yml looked up the commit tag in ECR on every run, but it logs in to AWS only when it pushes. A run that only builds, such as a pull request without the label push-image, had no AWS credentials there. On a runner without its own AWS credentials (the GitHub-hosted runners of public repos such as tiros and parsec), the lookup failed the job with NoCredentials.

The lookup now runs only when the job pushes. A run that only builds always builds, which is what it is for: to check that the image builds.

How I checked it

  • Ran the lookup step's script locally with no AWS credentials, as on a build-only run: it exits 1 with NoCredentials: Unable to locate credentials.
  • just ci (actionlint) passes.
  • Not tested in a real GitHub run. Workflows in this repo have no tests beyond actionlint.

Deploy

Nothing. Callers use @main, so the fix reaches them at merge. On probelab-ci, a build-only pull request whose tag is already in ECR now builds instead of skipping the build.

A run that only builds, such as a pull request without the label
push-image, does not log in to AWS. The ECR lookup still ran, so on a
runner without its own AWS credentials it failed the job with
NoCredentials. Such a run now skips the lookup and always builds.
@dennis-tra
dennis-tra merged commit 98505b4 into main Nov 11, 2026
1 check passed
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