From 846a7e68a6ea6bc2233551ad42e99032d1050e79 Mon Sep 17 00:00:00 2001 From: Sailinder Harpal Date: Wed, 12 Aug 2026 12:18:56 +0200 Subject: [PATCH] Apply suggestions from code review Good comments. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/publish.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f2b9b3eb..e7e90065 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -30,12 +30,10 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 - - name: Create ECR repository (if it does not exist) - run: | - aws ecr create-repository \ - --repository-name "${ECR_REPOSITORY}" \ - --image-scanning-configuration scanOnPush=true \ - 2>/dev/null || true +aws ecr create-repository \ + --repository-name "${ECR_REPOSITORY}" \ + --image-scanning-configuration scanOnPush=true \ + >/dev/null 2>&1 || aws ecr describe-repositories --repository-names "${ECR_REPOSITORY}" >/dev/null - name: Enforce image tag immutability run: | @@ -54,4 +52,4 @@ jobs: with: context: ${{ github.workspace }} push: true - tags: ${{ secrets.PICS_ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ github.event.release.tag_name }} +tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ github.event.release.tag_name }}