From 446dd5a9d0416284e76328e87cc2449ff6373857 Mon Sep 17 00:00:00 2001 From: Vitalij Vascenko Date: Thu, 5 Dec 2024 13:50:39 +0100 Subject: [PATCH] ci: [DX-3555] Add Azure cleanup workflow --- .github/workflows/clean-azure-blob.yml | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/clean-azure-blob.yml diff --git a/.github/workflows/clean-azure-blob.yml b/.github/workflows/clean-azure-blob.yml new file mode 100644 index 00000000..951ca4b9 --- /dev/null +++ b/.github/workflows/clean-azure-blob.yml @@ -0,0 +1,28 @@ +name: clean-azure-blob +on: + workflow_dispatch: + +permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + +jobs: + deploy_widgetbook_azure: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Azure login + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID}} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Clean widgetbook blob folder + uses: azure/CLI@v2 + with: + inlineScript: | + az storage blob delete-batch --source mews-ui-widgetbook --account-name ${{ secrets.AZURE_ACCOUNT_NAME }} --auth-mode login --dryrun