We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be76d0a commit 6bef21dCopy full SHA for 6bef21d
.github/workflows/main.yml
@@ -42,6 +42,18 @@ jobs:
42
build-args: |
43
DATABASE_URL=your_database_url
44
45
+
46
47
+ - name: Delete Old Images in ACR
48
+ run: |
49
+ # Get the list of images and filter to keep the latest one
50
+ latest_image="${{ secrets.AZURE_URL }}/incstats:${{ github.sha }}"
51
+ az acr repository show-tags --name sbuincstatsnorwayeastecr --repository incstats --query "[*]" -o tsv | \
52
+ grep -v "$latest_image" | while read -r image; do
53
+ echo "Deleting image: incstats:$image"
54
+ az acr repository delete --name <your_acr_name> --image incstats:$image --yes
55
+ done
56
57
- name: Redeploy Azure Container App
58
run: |
59
az containerapp revision copy \
0 commit comments