Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroGlezC authored May 10, 2024
1 parent 33ce6d1 commit 41f7590
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ jobs:
- name: Delete images
run: |
az acr login --name ${{ secrets.AZURE_REGISTRY_NAME }}
az acr repository delete --name ${{ secrets.AZURE_REGISTRY_NAME }} --repository syg-docker-db --yes
# Si la imagen existe, eliminarla, si no, imprimir mensaje
az acr repository show-manifests --name ${{ secrets.AZURE_REGISTRY_NAME }} --repository "syg-docker-db" --query "[?tags[0]=='0.1.0-SNAPSHOT']" > /dev/null 2>&1 \
&& az acr repository delete --name ${{ secrets.AZURE_REGISTRY_NAME }} --repository "syg-docker-d" --image "0.1.0-SNAPSHOT" --yes \
|| echo "Image 'syg-docker-d:0.1.0-SNAPSHOT' does not exist, skipping deletion."
- name: Push images
run: |
Expand Down

0 comments on commit 41f7590

Please sign in to comment.