Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mukunku/tag-exists-action

A GitHub action that determines if a tag exists in a repo
https://github.com/mukunku/tag-exists-action

cicd release-automation tags

Last synced: 3 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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:
```yaml
- 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`](https://github.com/actions/checkout/releases/tag/v1.0.0) exists in the repo `actions/checkout`:
```yaml
- 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](https://github.com/mukunku/tag-exists-action/wiki/Setting-the-GITHUB_TOKEN-explicitly).