From e0cd68787d9c62b7f21d14b730af1facf89e6829 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Tue, 27 Jun 2023 09:40:36 +0100 Subject: [PATCH] Adding publishing docker images to a public ECR registry --- .github/workflows/publish.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f4fed3968..a6658df1b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,6 +18,9 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} +env: + AWS_REGION: us-east-1 + jobs: typecheck: name: ʦ TypeScript @@ -65,6 +68,7 @@ jobs: images: | ${{ github.repository }} ghcr.io/${{ github.repository }} + public.ecr.aws/i8g4o0p8/${{ github.event.repository.name }} tags: | type=ref,event=branch type=ref,event=pr @@ -87,6 +91,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: 🌐 Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: arn:aws:iam::067435167850:role/GitHubAction-AssumeRoleWithAction + aws-region: ${{ env.AWS_REGION }} + - name: 🐳 Build and push uses: docker/build-push-action@v4 with: