delete-package-versions
delete-package-versions copied to clipboard
[Feature Request] Support multiple packages
Right now just a single package is supported with package-name
. I tried specifying a list but that doesn't work. It would be great if multiple packages could be supported.
Hey @Niek great idea but I believe action matrices might come in handy for this ask. With matrices you can configure your workflow to run on multiple packages in parallel and even customise the workflow further.
@NamrataJha Matrices work great, but they require a separate job with matrix strategy to clean up the packages (instead of a single step inside a job). But I do understand if you don't want to clutter the code with supporting multiple package names.
I have developed this feature in a fork. I am aware of action matrices, and the code clutter that will be added to the code. But I still believe it is worth the price as it can simplify this action's configuration.
Hello @NamrataJha, did you already analyzed the PR from @OmarCastro? It will be integrated?
Hey @carlos-m-rodrigues @OmarCastro need some time for this. Will take a look in the week of April 18.
Hi @NamrataJha is there any update in this subject?
I came here looking for multi package deletion suport - but with matrixes I think this is not really required - since you can do this:
name: Cleanup packages
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
jobs:
clean:
strategy:
matrix:
package: ['First.Id.Of.Package', 'Second.Id.Of.Package']
runs-on: ubuntu-latest
steps:
- name: Delete Package
uses: actions/delete-package-versions@v3
with:
package-name: ${{ matrix.package }}
min-versions-to-keep: 10
delete-only-pre-release-versions: "false"
So unless you want to clean packages as part of a ci pipeline - I don't think its such a big issue :-)
But anyway - the above is an example until/if its natively supported
What about just supporting a regex for all (string) input?
The difference of deleting multiple packages via matrixes is billable time.
We are cleaning 32 different old packages via matrix and the result is:
And if we clean all packages in a single job: