This action gets the apps affected by the changes since the last successful build and sets them as outputs.
Amount of images to keep. Default: 3
If set to true all untagged images will not add to the amount of kept images. Default: true
Required Azure Tenant ID
Required Azure Secret
Required Azure Client ID
Required Repos that will be cleaned. Can be seperated by spaces, comma, semicolon or new line
Required Azure Container Registry endpoint'
Required Your GitHub access token (see Usage below).
Required The id
of the workflow to check against (e.g. main.yml).
Branch to get last successful commit from. Default: main
An array of all affected apps.
A comma seperated string of all affected apps
The amount of images that got deleted
jobs:
cleanup-acr:
runs-on: ubuntu-latest
name: Cleanup ACR
outputs:
deletedImageCount: ${{ steps.acr-cleanup.outputs.count }}
steps:
- uses: i40MC/azure-container-registry-cleanup-action@v1
id: acr-cleanup
with:
keep: 3
dontCountUntaggedImages: true
tenantId: <Azure-Tenant-ID>
secret: <Azure-Secret>
clientId: <Azure-Client-ID>
repos: repo-a repo-b,repo-c;repo-d
endpoint: example.azurecr.io