Skip to content

Clean Azure Container Registry #79

Clean Azure Container Registry

Clean Azure Container Registry #79

Workflow file for this run

name: Clean Azure Container Registry
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * MON"
jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Disable workflow
run: |
curl -X PUT -H "Authorization: token ${{ secrets.APK_BOT_TOKEN }}" \
https://api.github.com/repos/wso2/apk/actions/workflows/49589306/disable
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Login to AZURE AND DELETE
uses: azure/CLI@v1
with:
azcliversion: 2.44.1
inlineScript: |
for repo in $(az acr repository list --name ${{ secrets.AZURE_ACR_NAME }} --output tsv); do
az acr repository delete --name ${{ secrets.AZURE_ACR_NAME }} --repository $repo --yes
done
- name: Enable workflow
if: always()
run: |
curl -X PUT -H "Authorization: token ${{ secrets.APK_BOT_TOKEN }}" \
https://api.github.com/repos/wso2/apk/actions/workflows/49589306/enable