Skip to content

bbonkr/git-tag-check-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Git tag check action

This is an action to check if the tag you want to write exists in the remote repository.

Usages

Check if the provided git tag exists.

steps:
  - uses: actions/checkout@v4

  - uses: bbonkr/git-tag-check-action@v1
    id: git_tag_check
    with:
      github_token: ${{ secrets.GITHUB_TOKEN }}
      tag: 'v1.0.0'
  - name: logging
    run: |
      echo "Found tag=${{ steps.git_tag_check.outputs.tag }}"

Inputs

Name Required Description
tag Tag you want to check
github_token GitHub Personal Access Token. It requires REPO scope.
prefix Prefix of tag name. default value is '' (empty string).

Outputs

Name Description
tag If tag is exists, returns tag. Does not exist then empty string.
version Version string. Same as tag.
major Major number of version
minor Minor number of version
patch Patch number of version
prerelease Prerelease value of version
build Build value of version