delete-package-versions icon indicating copy to clipboard operation
delete-package-versions copied to clipboard

Ignore-Versions parameter is not support for random version numbers.

Open manojKumar-L opened this issue 2 years ago • 1 comments

Hi, I have tried to delete the packages with the random version numbers like 3.5.4, 3.6.5, 3.7.21, and 3.8.6 in the ignore-versions parameter. It deletes all the packages in my repository except the latest version. As Guideline said, we need to use the regex for the ignore-versions parameter, but there are fewer possibilities to use the regex in our case. Is there any option to pass the random versions in the ignore-versions parameter?

My Workflow:

name: Removing old artifacts
on:
  registry_package:
    types: [published]
jobs:
  delete-old-packages:
    runs-on: ubuntu-latest
    steps:
      - name: Delete package
        uses: actions/delete-package-versions@v4
        with:
          package-name:  com.sample.test.app
          package-type: maven
          token: ${{ secrets.TOKEN }}
          min-versions-to-keep: 1
          ignore-versions: 2.3.6 

I tried to pass the ignore-versions parameter like below: ignore-versions: '2.3.6,2.3.1,2.3.5' ignore-versions: "2.3.6,2.3.1,2.3.5" ignore-versions: '2.3.6 2.3.1 2.3.5' ignore-versions: 2.3.6, 2.3.1, 2.3.5

manojKumar-L avatar Jan 24 '23 07:01 manojKumar-L