8000 Add steps to upload Docker image to ECR by thebengeu · Pull Request #156 · supabase/postgres-meta · GitHub
[go: up one dir, main page]

Skip to content

Add steps to upload Docker image to ECR #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
files: postgres-meta-*.tar.gz

docker:
name: Release on Docker Hub
name: Release on Docker Hub and ECR
needs:
- semantic-release
if: needs.semantic-release.outputs.new-release-published == 'true'
Expand Down Expand Up @@ -96,3 +96,26 @@ jobs:
push: true
tags: supabase/postgres-meta:latest,supabase/postgres-meta:v${{ needs.semantic-release.outputs.new-release-version }}
platforms: linux/amd64,linux/arm64

- name: Login to ECR account - staging
uses: docker/login-action@v1
with:
registry: 436098097459.dkr.ecr.us-east-1.amazonaws.com
username: ${{ secrets.DEV_ACCESS_KEY_ID }}
password: ${{ secrets.DEV_SECRET_ACCESS_KEY }}

- name: Login to ECR account - prod
uses: docker/login-action@v1
with:
registry: 646182064048.dkr.ecr.us-east-1.amazonaws.com
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}

- name: Upload image to ECR
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
436098097459.dkr.ecr.us-east-1.amazonaws.com/postgres-meta:${{ needs.semantic-release.outputs.new-release-version }}
646182064048.dkr.ecr.us-east-1.amazonaws.com/postgres-meta:${{ needs.semantic-release.outputs.new-release-version }}
0