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

Feature: Get last n releases || releases compatible with semver range #6

Closed
LongLiveCHIEF opened this issue Aug 14, 2020 · 7 comments
Closed

Comments

@LongLiveCHIEF
Copy link
Contributor

Often if you're doing something like building a docker image around a product (for me it's the official octoprint/octoprint image), then you need to not only build an image for the latest release of a product, but several of the previous releases.

It would be great to be able to specify the last n releases, or to specify a semver input and get all tags that match.

@LongLiveCHIEF
Copy link
Contributor Author

I'm willing to help by contributing this feature if you like the idea. I was actually going to create this "get release" action, and figured I'd search the marketplace first. Ironically, @foosel is a contributor to this action, and she's the maintainer of the product I'm supporting docker images for!

I also recently released the HackerHappyHour/tagging-strategy action, which would pair with this nicely using the output. It's possible we could even create a compound action to get matching releases and create a matrix of tags.

@LongLiveCHIEF
Copy link
Contributor Author

LongLiveCHIEF commented Aug 14, 2020

Here's what I'm thinking this could look like: (see example of creating a matrix in one job and passing it to another from github actions docs

jobs:
  releases:
    outputs:
      matrix: ${{ steps.releases.outputs.matrix }}
    steps:
      # produces a matrix with a key of `matrix`
      - name: Get Releases
         id: releases
         uses: pozetroninc/github-action-get-latest-release
          with: 
            repository: some/repository
            semver: '^1.0.0'
  build:
    needs: releases
    strategy: 
      matrix: ${{ needs.releases.outputs.matrix }}

@LongLiveCHIEF
Copy link
Contributor Author

related #5

@neil-pozetroninc
Copy link
Contributor

Hey @LongLiveCHIEF, that sounds like a super useful idea!

If I understand correctly though, it would mean that get-latest-release would no longer only be returning the one and only latest release. If we go ahead with this idea I would like to propose that we fork this action and create another sibling action which would get "releases".

I'll then port the semver functionality to this action so that this action gets the latest single release that matches the semver and point people in the README to the sibling action for getting a list of releases if that's their use case.

Does that sound like a good idea?

@LongLiveCHIEF
Copy link
Contributor Author

I had the same thought, just didn't want to preempt you.

@dannysauer
Copy link

Did the fork happen, or did everyone fall down a well? :)

@LongLiveCHIEF
Copy link
Contributor Author

LongLiveCHIEF commented Jun 11, 2021 via email

@neil-pozetroninc neil-pozetroninc closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2023
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

No branches or pull requests

3 participants