diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index cb8891476df..d4a844bec3c 100644 --- a/.github/workflows/cd-syft-dev.yml +++ b/.github/workflows/cd-syft-dev.yml @@ -70,15 +70,15 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Install Azure CLI - run: | - curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash - az version + # - name: Install Azure CLI + # run: | + # curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + # az version - - name: Login to Azure CLI - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS_GITHUB_CI }} + # - name: Login to Azure CLI + # uses: azure/login@v1 + # with: + # creds: ${{ secrets.AZURE_CREDENTIALS_GITHUB_CI }} - name: Login to Azure Container Registry uses: azure/docker-login@v1 @@ -179,35 +179,35 @@ jobs: push: "origin main" cwd: "./infrastructure/" - - name: Cleanup Azure Container Registry - run: | - ACR_REGISTRY_NAME=${{ secrets.ACR_REGISTRY_NAME }} - - echo ">> Fetching repo list.." - REPO_LIST=$(az acr repository list -n $ACR_REGISTRY_NAME -o tsv) - - KEEP_PREV_VERSIONS=5 - TAIL_FROM_LINE=$(($KEEP_PREV_VERSIONS + 1)) - - for repo in $REPO_LIST - do - echo "Cleaning up '$repo'" - # remove dev tags - az acr repository show-tags --name $ACR_REGISTRY_NAME --repository $repo --orderby time_desc --output tsv \ - | grep dev- \ - | tail -n +$TAIL_FROM_LINE \ - | xargs -r -I% az acr repository untag --name $ACR_REGISTRY_NAME --image $repo:% - - # remove beta tags - az acr repository show-tags --name $ACR_REGISTRY_NAME --repository $repo --orderby time_desc --output tsv \ - | grep beta \ - | tail -n +$TAIL_FROM_LINE \ - | xargs -r -I% az acr repository untag --name $ACR_REGISTRY_NAME --image $repo:% - done - - - name: Logout and cleanup Azure account - if: always() - run: | - az logout - az cache purge - az account clear + # - name: Cleanup Azure Container Registry + # run: | + # ACR_REGISTRY_NAME=${{ secrets.ACR_REGISTRY_NAME }} + + # echo ">> Fetching repo list.." + # REPO_LIST=$(az acr repository list -n $ACR_REGISTRY_NAME -o tsv) + + # KEEP_PREV_VERSIONS=5 + # TAIL_FROM_LINE=$(($KEEP_PREV_VERSIONS + 1)) + + # for repo in $REPO_LIST + # do + # echo "Cleaning up '$repo'" + # # remove dev tags + # az acr repository show-tags --name $ACR_REGISTRY_NAME --repository $repo --orderby time_desc --output tsv \ + # | grep dev- \ + # | tail -n +$TAIL_FROM_LINE \ + # | xargs -r -I% az acr repository untag --name $ACR_REGISTRY_NAME --image $repo:% + + # # remove beta tags + # az acr repository show-tags --name $ACR_REGISTRY_NAME --repository $repo --orderby time_desc --output tsv \ + # | grep beta \ + # | tail -n +$TAIL_FROM_LINE \ + # | xargs -r -I% az acr repository untag --name $ACR_REGISTRY_NAME --image $repo:% + # done + + # - name: Logout and cleanup Azure account + # if: always() + # run: | + # az logout + # az cache purge + # az account clear