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