mirror of
https://github.com/bitwarden/self-host.git
synced 2026-06-28 14:25:45 +00:00
Fix release workflow (#112)
This commit is contained in:
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@@ -182,9 +182,9 @@ jobs:
|
||||
|
||||
if [ -z "${{ matrix.release_tag }}" ]; then
|
||||
# Use core release tag by default.
|
||||
echo "RELEASE_TAG=$_CORE_RELEASE_TAG" >> $GITHUB_OUTPUT
|
||||
echo "release_tag=$_CORE_RELEASE_TAG" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "RELEASE_TAG=${{ matrix.release_tag }}" >> $GITHUB_OUTPUT
|
||||
echo "release_tag=${{ matrix.release_tag }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
########## DockerHub ##########
|
||||
@@ -198,11 +198,13 @@ jobs:
|
||||
- name: Pull versioned image
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
RELEASE_TAG: ${{ steps.setup.outputs.release_tag }}
|
||||
run: docker pull bitwarden/$PROJECT_NAME:$RELEASE_TAG
|
||||
|
||||
- name: Tag latest
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
RELEASE_TAG: ${{ steps.setup.outputs.release_tag }}
|
||||
run: docker tag bitwarden/$PROJECT_NAME:$RELEASE_TAG bitwarden/$PROJECT_NAME:latest
|
||||
|
||||
- name: Push latest image
|
||||
@@ -234,9 +236,10 @@ jobs:
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
REGISTRY: bitwardenqa.azurecr.io
|
||||
RELEASE_TAG: ${{ steps.setup.outputs.release_tag }}
|
||||
run: docker tag bitwarden/$PROJECT_NAME:$RELEASE_TAG $REGISTRY/$PROJECT_NAME:latest
|
||||
|
||||
- name: Push version and latest image
|
||||
- name: Push latest image
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
REGISTRY: bitwardenqa.azurecr.io
|
||||
@@ -282,30 +285,30 @@ jobs:
|
||||
echo "project_name=$PROJECT_NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
########## ACR ##########
|
||||
- name: Login to Azure - QA Subscription
|
||||
- name: Login to Azure - Prod Subscription
|
||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_QA_KV_CREDENTIALS }}
|
||||
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
|
||||
|
||||
- name: Login to Azure ACR
|
||||
run: az acr login -n bitwardenqa
|
||||
run: az acr login -n bitwardenprod
|
||||
|
||||
- name: Pull versioned image
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
REGISTRY: bitwardenqa.azurecr.io
|
||||
REGISTRY: bitwardenprod.azurecr.io
|
||||
run: docker pull $REGISTRY/$PROJECT_NAME:$_RELEASE_TAG
|
||||
|
||||
- name: Tag latest
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
REGISTRY: bitwardenqa.azurecr.io
|
||||
REGISTRY: bitwardenprod.azurecr.io
|
||||
run: docker tag $REGISTRY/$PROJECT_NAME:$_RELEASE_TAG $REGISTRY/$PROJECT_NAME:latest
|
||||
|
||||
- name: Push version and latest image
|
||||
- name: Push latest image
|
||||
env:
|
||||
PROJECT_NAME: ${{ steps.setup.outputs.project_name }}
|
||||
REGISTRY: bitwardenqa.azurecr.io
|
||||
REGISTRY: bitwardenprod.azurecr.io
|
||||
run: docker push $REGISTRY/$PROJECT_NAME:latest
|
||||
|
||||
- name: Log out of Docker
|
||||
|
||||
Reference in New Issue
Block a user