From 581c20ced345a7a9bcc9896ea19ccff448bb35ae Mon Sep 17 00:00:00 2001 From: William Shelley Date: Tue, 17 Dec 2024 12:52:32 +0000 Subject: [PATCH 1/2] feat: create repo action --- .github/workflows/docker.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index b68f88e..25b1354 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -74,6 +74,12 @@ jobs: with: role-to-assume: ${{ env.AWS_OIDC_ROLE }} aws-region: ${{ env.AWS_REGION }} + + - name: Create repository + uses: int128/create-ecr-repository-action@v1 + id: ecr + with: + repository: ${{ inputs.repository }} - name: Login to ${{ env.REGISTRY }} if: ${{ inputs.push }} From c2cecc3e8d6c24abdb34c793a3375e70dc76cceb Mon Sep 17 00:00:00 2001 From: William Shelley Date: Thu, 9 Jan 2025 12:38:40 +0000 Subject: [PATCH 2/2] fix: switched ecr repo creation to cli --- .github/workflows/docker.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 25b1354..691d2cb 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -75,11 +75,10 @@ jobs: role-to-assume: ${{ env.AWS_OIDC_ROLE }} aws-region: ${{ env.AWS_REGION }} - - name: Create repository - uses: int128/create-ecr-repository-action@v1 + - name: Create repository if not exists id: ecr - with: - repository: ${{ inputs.repository }} + run: | + aws ecr create-repository --repository-name ${{ inputs.repository }} --image-tag-mutability IMMUTABLE || true - name: Login to ${{ env.REGISTRY }} if: ${{ inputs.push }}