mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
Fix image_tag calculation (#3775)
This commit is contained in:
parent
0766806279
commit
b1967aa8a7
6
.github/workflows/cleanup-after-pr.yml
vendored
6
.github/workflows/cleanup-after-pr.yml
vendored
@ -10,9 +10,6 @@ jobs:
|
|||||||
name: Remove branch-specific Docker images
|
name: Remove branch-specific Docker images
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
|
||||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
|
||||||
|
|
||||||
########## ACR ##########
|
########## ACR ##########
|
||||||
- name: Log in to Azure - QA Subscription
|
- name: Log in to Azure - QA Subscription
|
||||||
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7
|
||||||
@ -33,6 +30,7 @@ jobs:
|
|||||||
########## Remove Docker images ##########
|
########## Remove Docker images ##########
|
||||||
- name: Remove the Docker image from ACR
|
- name: Remove the Docker image from ACR
|
||||||
env:
|
env:
|
||||||
|
REF: ${{ github.event.pull_request.head.ref }}
|
||||||
REGISTRIES: |
|
REGISTRIES: |
|
||||||
registries:
|
registries:
|
||||||
- bitwardenprod
|
- bitwardenprod
|
||||||
@ -59,7 +57,7 @@ jobs:
|
|||||||
for REGISTRY in $( echo "${{ env.REGISTRIES }}" | yq e ".registries[]" - )
|
for REGISTRY in $( echo "${{ env.REGISTRIES }}" | yq e ".registries[]" - )
|
||||||
do
|
do
|
||||||
SERVICE_NAME=$(echo $SERVICE | awk '{print tolower($0)}')
|
SERVICE_NAME=$(echo $SERVICE | awk '{print tolower($0)}')
|
||||||
IMAGE_TAG=$(echo "${GITHUB_REF:11}" | sed "s#/#-#g") # slash safe branch name
|
IMAGE_TAG=$(echo "${REF}" | sed "s#/#-#g") # slash safe branch name
|
||||||
|
|
||||||
echo "[*] Checking if remote exists: $REGISTRY.azurecr.io/$SERVICE_NAME:$IMAGE_TAG"
|
echo "[*] Checking if remote exists: $REGISTRY.azurecr.io/$SERVICE_NAME:$IMAGE_TAG"
|
||||||
TAG_EXISTS=$(
|
TAG_EXISTS=$(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user