From 2c604d0fe5990dffeb4e37b7837e0964c6a64e87 Mon Sep 17 00:00:00 2001 From: mimartin12 <77340197+mimartin12@users.noreply.github.com> Date: Mon, 1 May 2023 13:56:04 -0600 Subject: [PATCH] [DEVOPS-1376] - Add step to pull from ACR (#2890) --- .github/workflows/release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4674e385f..96ed73fb54 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -291,14 +291,27 @@ jobs: - name: Login to Azure ACR run: az acr login -n bitwardenprod + - name: Pull latest project image + if: matrix.origin_docker_repo == 'bitwardenprod.azurecr.io' + env: + PROJECT_NAME: ${{ steps.setup.outputs.project_name }} + ORIGIN_REGISTRY: ${{ matrix.origin_docker_repo }} + run: | + if [[ "${{ github.event.inputs.release_type }}" == "Dry Run" ]]; then + docker pull $ORIGIN_REGISTRY/$PROJECT_NAME:dev + else + docker pull $ORIGIN_REGISTRY/$PROJECT_NAME:$_BRANCH_NAME + fi + - name: Tag version and latest + if: matrix.origin_docker_repo == 'bitwardenprod.azurecr.io' env: PROJECT_NAME: ${{ steps.setup.outputs.project_name }} REGISTRY: bitwardenprod.azurecr.io ORIGIN_REGISTRY: ${{ matrix.origin_docker_repo }} run: | if [[ "${{ github.event.inputs.release_type }}" == "Dry Run" ]]; then - docker tag $ORIGIN_REGISTRY/$PROJECT_NAME:latest $REGISTRY/$PROJECT_NAME:dryrun + docker tag $ORIGIN_REGISTRY/$PROJECT_NAME:dev $REGISTRY/$PROJECT_NAME:dryrun else docker tag $ORIGIN_REGISTRY/$PROJECT_NAME:$_BRANCH_NAME $REGISTRY/$PROJECT_NAME:$_RELEASE_VERSION docker tag $ORIGIN_REGISTRY/$PROJECT_NAME:$_BRANCH_NAME $REGISTRY/$PROJECT_NAME:latest