Skip to content

tag-exists-action

Actions
Checks if a given tag exists
v1.7.0
Latest
Star (41)

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: check-tag
  with: 
    tag: 'v1.0'

- run: echo "Tag exists!"
  if: steps.check-tag.outputs.exists == 'true' 

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

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

- run: echo "Tag exists!"
  if: steps.check-tag.outputs.exists == 'true'

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.

tag-exists-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Checks if a given tag exists
v1.7.0
Latest

tag-exists-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.