Skip to content

ci: push images via ecr-push helper instead of docker push - #675

Merged
aditya1702 merged 1 commit into
mainfrom
fix/prd-ecr-push
Aug 3, 2026
Merged

ci: push images via ecr-push helper instead of docker push#675
aditya1702 merged 1 commit into
mainfrom
fix/prd-ecr-push

Conversation

@aditya1702

Copy link
Copy Markdown
Contributor

What

Switches the push step in build.yml and build-cnpg-timescaledb.yml from plain docker push to the ecr-push helper that stellar/actions/sdf-ecr-login@main installs onto PATH.

Why

The prd dispatches added in #674 fail at the push step:

denied: User: arn:aws:sts::746476062914:assumed-role/github-actions-ecr-push/ecr-push-<run>-1
is not authorized to perform: ecr:InitiateLayerUpload on resource:
arn:aws:ecr:us-east-1:746476062914:repository/prd/wallet-backend

(same for prd/cnpg-timescaledb — runs 30826813834, 30826834157).

The github-actions-ecr-push role's push permissions are gated on the target ECR repository carrying a Repository=<github org/repo> resource tag. ecr-push handles exactly that before pushing: it creates a missing repo (only under dev/, stg/, prd/) with the tag, or adds the tag to an existing repo that lacks it. prd/wallet-backend exists without the tag; prd/cnpg-timescaledb doesn't exist yet — the first run self-heals both, which also removes the "create prd/cnpg-timescaledb in ECR first" prerequisite noted in #674.

This is the same pattern gesserit uses: build-and-push.yml.

Notes

  • publish-prerelease.yml still pushes to stg via make docker-push; that path works today (stg repos already carry the tag). Can be switched to ecr-push as a consistency follow-up.
  • promote-release.yml retags to prd/wallet-backend via docker buildx imagetools create; once the first ecr-push run stamps the Repository tag on that repo, its access is covered too.

The github-actions-ecr-push role's ECR push permissions are ABAC-gated on a
Repository=<github repo> resource tag. Plain docker push fails against
prd/wallet-backend (repo exists, tag missing) and prd/cnpg-timescaledb (repo
missing) with ecr:InitiateLayerUpload denials. The ecr-push wrapper installed
by stellar/actions/sdf-ecr-login creates missing dev/stg/prd repos, stamps the
Repository tag, and then pushes.
Copilot AI review requested due to automatic review settings August 3, 2026 16:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Replaces direct Docker pushes with the ECR-aware helper installed by sdf-ecr-login.

Changes:

  • Uses ecr-push for wallet-backend images.
  • Uses ecr-push for CNPG TimescaleDB images.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/build.yml Pushes application images through ecr-push.
.github/workflows/build-cnpg-timescaledb.yml Pushes database images through ecr-push.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aditya1702
aditya1702 merged commit bdb934b into main Aug 3, 2026
10 checks passed
@aditya1702
aditya1702 deleted the fix/prd-ecr-push branch August 3, 2026 16:08
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.

3 participants