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

feat: add prefix match tag input option #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmocquet
Copy link

@gmocquet gmocquet commented May 10, 2022

I have a special case: we are moving our legacy app to totally new architecture.

The legacy app is tagged WITHOUT the v prefix, based ONLY on the SemVer notation. For example, latest tag is: 0.0.91
The new app is tagged WITH the v prefix. For example, latest tag is: v1.0.0

I have upgrade my GitHub Action CI/CD to continue to support the both notation, relay on this, I can easily identify old and new tags/packages. In the futur, it will be easy to remove all old stuff without to check if current tag is old or new app.

Both stacks could have new version.


Context: currents tags on my git hub repo:

image

Actual behavior

If I push something related to my old stack, I'm attending that the new tag will be 0.0.92. With the version 6.0, it was not the case, the latest tag used was v1.0.0 (related to the new stack), so, new tag will be 1.0.1
image

Attended & new behavior

I use the new option prefix_match_tag I introduce to informe the github-tag-action I want that all tags must MATCH with tag_prefix to be valide. Below, usage example:

- name: Bump version and push tag
  uses: gmocquet/[email protected]
  with:
      github_token: ${{ secrets.BOT_PAT }}
      tag_prefix: ""
      release_branches: "main-v1"
      create_annotated_tag: true
      dry_run: true
      prefix_match_tag: true

Now, when I push something related to old stack, all tags prefixed by v are exclude, so, I have the attended behavior: new version is 0.0.92
image

@gmocquet gmocquet force-pushed the feat-add-option-prefix-match-tag branch from d83cdbd to a304100 Compare May 10, 2022 07:59
@gmocquet gmocquet force-pushed the feat-add-option-prefix-match-tag branch 2 times, most recently from 96ed2b7 to 7bce760 Compare May 10, 2022 08:06
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 this pull request may close these issues.

1 participant