Skip to content

Refactor CI workflow for Amazon ECR release and update checkout action#6

Merged
openminddev merged 4 commits intomainfrom
update-release
Apr 20, 2026
Merged

Refactor CI workflow for Amazon ECR release and update checkout action#6
openminddev merged 4 commits intomainfrom
update-release

Conversation

@openminddev
Copy link
Copy Markdown
Contributor

This pull request updates the release workflow to publish Docker images to Amazon ECR Public instead of Docker Hub, and introduces several improvements to permissions, environment handling, and AWS integration. The changes enhance security and align the deployment process with AWS best practices.

Migration to Amazon ECR Public & AWS Integration:

  • Switched Docker image publishing from Docker Hub to Amazon ECR Public, updating login steps and image tags to use the ECR registry (public.ecr.aws/b8k9c8n5/openmind/functiongemma_service).
  • Added a step to configure AWS credentials using aws-actions/configure-aws-credentials, leveraging GitHub secrets for secure authentication.
  • Replaced Docker Hub login with Amazon ECR Public login using aws-actions/amazon-ecr-login@v2.

Workflow and Permissions Enhancements:

  • Set explicit job permissions for id-token, contents, and deployments, and dynamically assigned the environment (production or staging) based on the reference type.
  • Added support for manual workflow dispatch and improved event triggers.

Other Improvements:

  • Minor updates to naming conventions and Docker build step configuration for consistency and clarity.

Refactor release workflow to push images to Amazon ECR and add deploy metadata. Changes include renaming the workflow, enabling manual dispatch, adding permissions and environment (production/staging) details, and configuring AWS credentials. Switched checkout action to v4, replaced Docker Hub login with AWS ECR login, updated image name to public.ecr.aws/... and adjusted Dockerfile path and build step (added id and clarified title). These updates prepare the pipeline for ECR-based releases and proper environment tagging.
Update .github/workflows/release.yml to use actions/checkout@v5 (previously v4). This upgrades the checkout action in the release workflow to the latest major version to pick up fixes and improvements.
Update the GitHub Actions release workflow to authenticate against Amazon ECR Public. The step label was changed to "Login to Amazon ECR Public" and the aws-actions/amazon-ecr-login@v2 action now receives `registry-type: public` so subsequent Docker operations target the public ECR registry.
@openminddev openminddev merged commit 98301e6 into main Apr 20, 2026
4 checks 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