ajgranowski/Preceding Tag Action
Find the latest/previous/last/preceding tag of a commit using only the GitHub API, similar to git describe.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| default-tag | The default tag to return if no preceding tag was found. | no | "" |
| include-ref | If true, include tags pointing to `ref` as candidates. | no | false |
| limit-tags | Tag fetch limit. Only tags matching `regex` count towards this limit. Increasing this may produce a more accurate result when `ref` is very far away from `HEAD`. | no | 100 |
| limit-traversal-commits | The commit traversal limit while searching for a preceding tag. | no | 1000 |
| limit-traversal-tags | The tag traversal limit while searching for a preceding tag. Behaves similar to `--candidates` on `git describe`. | no | 6 |
| ref | The branch, tag, or SHA to find the preceding tag from. | yes | ${{ github.sha }} |
| regex | A regular expression used to filter candidate tag names. | no | ^.+$ |
| repository | Repository name with owner. For example, `AJGranowski/preceding-tag-action` | no | ${{ github.repository }} |
| token | Personal access token (PAT) used to fetch the tags. | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| tag | The preceding tag, or `default-tag` if no preceding tag matching the filter was found. |
| tag-found | True if the preceding tag was found. False if the `default-tag` fallback was used. |