mathieudutour / mathieudutour/github-tag-action
Git tag is created on PR
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 733
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Description
Hi :)
I started using this action in one of my projects and I really like it so far!
One issue came up thought:
My CI configuration looks like this:
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main','dev' ]
get-version:
name: 'Get Version'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v5.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: main
build-stuff:
name: 'Build and Push Docker Images'
needs: [ get-version ]
runs-on: ubuntu-latest
...
So the job runs on all pushes to main and all PRs into main and dev. The README states:
release_branches (optional) - Comma separated list of branches (JavaScript regular expression accepted) that will generate the release tags. Other branches and pull-requests generate versions postfixed with the commit hash and do not generate any repository tag.
So I would expect the action to output a value for new_version, but not create a new tag in the repository. However a new tag is being created on PRs.
Any help on this would be appreciated 😀
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the workflow from the issue with both push and pull_request triggers, using release_branches set to main. Inspect the action's handling of pull requests and branch matching; done means pull requests produce new_version without creating a repository tag, while pushes to main retain tagging behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github-actions, typescript
- Domain
- ci-cd, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100