Feature: Get last `n` releases || releases compatible with semver range
Opened this issue · 0 comments
LongLiveCHIEF commented
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.
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:
tagging:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.tags.outputs.tag_matrix}}
steps:
- id: tags
uses: HackerHappyHour/tagging-strategy@v2
with:
tag_expansion_rule: '~X.Y.Z'
build:
runs-on: ubuntu-latest
strategy:
matrix: $ {{ fromJson(needs.tagging.outputs.matrix) }