https://github.com/julbme/gh-action-manage-tag
GitHub Action to manage tags
https://github.com/julbme/gh-action-manage-tag
ci create delete github-action tag
Last synced: 10 months ago
JSON representation
GitHub Action to manage tags
- Host: GitHub
- URL: https://github.com/julbme/gh-action-manage-tag
- Owner: julbme
- License: mit
- Created: 2022-02-20T13:13:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T21:05:12.000Z (over 3 years ago)
- Last Synced: 2025-02-19T06:34:50.017Z (over 1 year ago)
- Topics: ci, create, delete, github-action, tag
- Language: Java
- Homepage: https://julbme.github.io/gh-action-manage-tag/
- Size: 648 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/julbme/gh-action-manage-tag/actions/workflows/maven-build.yml)
[](https://github.com/julbme/gh-action-manage-tag/actions/workflows/commitlint.yml)
[](https://sonarcloud.io/summary/new_code?id=julbme_gh-action-manage-tag)

# GitHub Action to manage tags
The GitHub Action for managing tags of the GitHub repository.
- Create a new tag
- Move the tag to another commit
- Delete a tag
## Usage
### Example Workflow file
- Create a tag:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create/Update the tag
uses: julbme/gh-action-manage-tag@v1
with:
name: tag-name
state: present
from: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
- Delete a tag
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Delete the tag
uses: julbme/gh-action-manage-tag@v1
with:
name: tag-name
state: absent
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### Inputs
| Name | Type | Default | Description |
|---------|--------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `name` | string | `Not set` | Name of the tag. **Required** |
| `state` | string | `present` | Expected state of the tag. Valid values are `present` to create the tag or `absent` to delete the tag |
| `from` | string | `github.sha` | The reference from which to create or update the tag - could be a branch, a tag, a ref or a specific SHA. By default, it takes the commit that triggered the workflow. |
### Outputs
| Name | Type | Description |
|--------|--------|-------------------------------------------------------------------------|
| `ref` | string | Git ref of the tag `refs/tags/name`, or ` ` in case the tag is deleted. |
| `name` | string | Name of the tag, or ` ` in case the tag is deleted. |
| `sha` | sha | SHA Commit of the tag, or ` ` in case the tag is deleted. |
## Contributing
This project is totally open source and contributors are welcome.