Skip to content
check

GitHub Action

git-tag-check-action

v1.2.0 Latest version

git-tag-check-action

check

git-tag-check-action

Check git tag is exists or not

Installation

Copy and paste the following snippet into your .yml file.

              

- name: git-tag-check-action

uses: bbonkr/[email protected]

Learn more about this action in bbonkr/git-tag-check-action

Choose a version

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