Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not deleting older releases, simply the last releases in the list. #14

Closed
okibcn opened this issue Mar 20, 2022 · 7 comments · Fixed by #15
Closed

It is not deleting older releases, simply the last releases in the list. #14

okibcn opened this issue Mar 20, 2022 · 7 comments · Fixed by #15

Comments

@okibcn
Copy link

okibcn commented Mar 20, 2022

When several jobs in the same repo are generating different releases with different names — For instance, when releasing the same code for different platforms.

In such case, the releases are not sorted by date. The action should order the releases by date, and then keep the most recent ones.

@thadguidry
Copy link
Collaborator

Where or what area are you seeing the "not sorted by date" specifically? Some GitHub view or an API query?

@okibcn
Copy link
Author

okibcn commented Mar 21, 2022

When I use gh release list, all the releases are sorted by date. but not when I go to the releases or tag page online. Or when I do a json query like:
curl -v "https://api.github.com/repos/OWNER/REPO/tags"

I don't know how this action is sorting the releases and tags to select the oldest. But, for sure, it is not deleting the oldest releases and unused tags. It is just keeping the first few of the list and deleting the rest. And sometimes the new releases are deleted.
It is clear that the code is not sorting the list by date before selecting the items to delete.

@okibcn
Copy link
Author

okibcn commented Mar 23, 2022

@dev-drprasad , I am now using this action in my daily build of OpenWrt firmware for 3 routers here: https://github.com/okibcn/myopenwrt/releases

As you can see, the repo lists the releases not in chronological order, and this action is deleting the last in line that, sometimes are the most recent releases. This is why I am actually confming that thedelete-older-releases is not actually deleting the older releases, but the last of a list that is not chronological.

@smallprogram
Copy link
Contributor

+1

@okibcn
Copy link
Author

okibcn commented Apr 11, 2022

I had to abandon this action. I built my own one using a short shell script using the gh API.

@smallprogram
Copy link
Contributor

smallprogram commented Apr 11, 2022

@okibcn @thadguidry @dev-drprasad
already fixed

@thadguidry
Copy link
Collaborator

@smallprogram Thanks, I've reached out to @dev-drprasad on Twitter to ask for maintainer access to this repo to continue to help the community and maintain and enhance it. Hopefully he responds soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants