Skip to content

Commit ea1c553

Browse files
authored
Merge pull request #156 from supabase/feat/ecr
Add steps to upload Docker image to ECR
2 parents 658bd15 + 29795a1 commit ea1c553

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
files: postgres-meta-*.tar.gz
6363

6464
docker:
65-
name: Release on Docker Hub
65+
name: Release on Docker Hub and ECR
6666
needs:
6767
- semantic-release
6868
if: needs.semantic-release.outputs.new-release-published == 'true'
@@ -96,3 +96,26 @@ jobs:
9696
push: true
9797
tags: supabase/postgres-meta:latest,supabase/postgres-meta:v${{ needs.semantic-release.outputs.new-release-version }}
9898
platforms: linux/amd64,linux/arm64
99+
100+
- name: Login to ECR account - staging
101+
uses: docker/login-action@v1
102+
with:
103+
registry: 436098097459.dkr.ecr.us-east-1.amazonaws.com
104+
username: ${{ secrets.DEV_ACCESS_KEY_ID }}
105+
password: ${{ secrets.DEV_SECRET_ACCESS_KEY }}
106+
107+
- name: Login to ECR account - prod
108+
uses: docker/login-action@v1
109+
with:
110+
registry: 646182064048.dkr.ecr.us-east-1.amazonaws.com
111+
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
112+
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}
113+
114+
- name: Upload image to ECR
115+
uses: docker/build-push-action@v2
116+
with:
117+
context: .
118+
push: true
119+
tags: |
120+
436098097459.dkr.ecr.us-east-1.amazonaws.com/postgres-meta:${{ needs.semantic-release.outputs.new-release-version }}
121+
646182064048.dkr.ecr.us-east-1.amazonaws.com/postgres-meta:${{ needs.semantic-release.outputs.new-release-version }}

0 commit comments

Comments
 (0)