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