From 01136ebab2b26a729399bc464829fc6460708d80 Mon Sep 17 00:00:00 2001 From: Arne Dumarey Date: Mon, 26 Feb 2024 10:30:27 +0100 Subject: [PATCH] fix(bump): fix ci push to new ECR --- .github/workflows/release.yml | 38 ++++++++--------------------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 194dee0e..3e5cf400 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,25 +102,27 @@ jobs: echo RELEASE_VERSION=$(cat semver) >> $GITHUB_ENV shell: bash - - name: Configure AWS credentials (Test) + - name: Configure AWS credentials if: env.RELEASE_VERSION != 'none' uses: aws-actions/configure-aws-credentials@v1 with: - aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_TST }} - aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_TST }} + aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_DEVOPS }} + aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_DEVOPS }} aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} - - name: Login to Amazon ECR (Test) + - name: Login to Amazon ECR if: env.RELEASE_VERSION != 'none' uses: aws-actions/amazon-ecr-login@v1.5.3 - - name: Push to Test + - name: Push artifacts to ECR if: env.RELEASE_VERSION != 'none' shell: bash run: | - docker push $BUILD_DOCKER_REGISTRY_TST/public-api/api-legacy:$SEMVER + docker tag $BUILD_DOCKER_REGISTRY_TST/public-api/api-legacy:$SEMVER $BUILD_DOCKER_REGISTRY/public-api/api-legacy:$SEMVER + docker push $BUILD_DOCKER_REGISTRY/public-api/api-legacy:$SEMVER env: BUILD_DOCKER_REGISTRY_TST: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_TST }} + BUILD_DOCKER_REGISTRY: ${{ secrets.VBR_DEVOPS_DOCKER_REGISTRY }} SEMVER: ${{ env.RELEASE_VERSION }} WORKSPACE: ${{ github.workspace }} @@ -172,30 +174,6 @@ jobs: SEMVER: ${{ env.RELEASE_VERSION }} WORKSPACE: ${{ github.workspace }} - - name: Configure AWS credentials (Production) - if: env.RELEASE_VERSION != 'none' - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.VBR_AWS_ACCESS_KEY_ID_PRD }} - aws-secret-access-key: ${{ secrets.VBR_AWS_SECRET_ACCESS_KEY_PRD }} - aws-region: ${{ secrets.VBR_AWS_REGION_PRD }} - - - name: Login to Amazon ECR (Production) - if: env.RELEASE_VERSION != 'none' - uses: aws-actions/amazon-ecr-login@v1.5.3 - - - name: Push to Production - if: env.RELEASE_VERSION != 'none' - shell: bash - run: | - docker tag $BUILD_DOCKER_REGISTRY_TST/public-api/api-legacy:$SEMVER $BUILD_DOCKER_REGISTRY_PRD/public-api/api-legacy:$SEMVER - docker push $BUILD_DOCKER_REGISTRY_PRD/public-api/api-legacy:$SEMVER - env: - BUILD_DOCKER_REGISTRY_TST: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_TST }} - BUILD_DOCKER_REGISTRY_PRD: ${{ secrets.VBR_BUILD_DOCKER_REGISTRY_PRD }} - SEMVER: ${{ env.RELEASE_VERSION }} - WORKSPACE: ${{ github.workspace }} - - name: Publish to Confluence if: env.RELEASE_VERSION != 'none' shell: bash