Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
bookmark

GitHub Action

tag-exists-action

v1.4.0

tag-exists-action

A GitHub action that determines if a tag exists in a repo.

Inputs

tag

Required - The tag to search for.

repo

Optional - Repo you'd like to search, in owner/repo-name format.

Outputs

exists

A string value of 'true' or 'false'

Example usages

To check if the tag v1.0 exists in your repo:

- uses: mukunku/[email protected]
  id: checkTag
  with: 
    tag: 'v1.0'

- run: echo ${{ steps.checkTag.outputs.exists }}

To check if the tag v1.0.0 exists in the repo actions/checkout:

- uses: mukunku/[email protected]
  id: checkTag
  with: 
    tag: 'v1.0.0'
    repo: 'actions/checkout'

- run: echo ${{ steps.checkTag.outputs.exists }}

This action uses the ${{github.token}} secret to automatically inject your access token. If you'd like to provide your own token instead check out this help article.