https://github.com/lee-lott-actions/delete-git-tag
This repository contains a GitHub Action that deletes a specified git tag from your repository using the GitHub API. It is designed to help automate tag management and keep your repository tidy as part of your release workflow.
https://github.com/lee-lott-actions/delete-git-tag
devops github-api
Last synced: about 13 hours ago
JSON representation
This repository contains a GitHub Action that deletes a specified git tag from your repository using the GitHub API. It is designed to help automate tag management and keep your repository tidy as part of your release workflow.
- Host: GitHub
- URL: https://github.com/lee-lott-actions/delete-git-tag
- Owner: lee-lott-actions
- Created: 2026-01-19T21:00:18.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-06-09T18:41:53.000Z (28 days ago)
- Last Synced: 2026-06-09T20:17:26.894Z (28 days ago)
- Topics: devops, github-api
- Language: PowerShell
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Delete Git Tag from Repository GitHub Action
This GitHub Action deletes a git tag from your repository using the GitHub REST API and PowerShell.
It is designed to be simple, composable, and independent of the local git state.
## Features
- Deletes a tag from your repository via the REST API (no dependencies on local git or CLI).
- Lets you specify the tag name, organization, and repository.
- Fully supports GitHub Organizations and user-owned repositories.
- Outputs the tag deletion result and error message (if any) for use in subsequent workflow steps.
- Designed for secure automation with the minimal required token permissions.
## Inputs
| Name | Description | Required | Default |
|-------------|--------------------------------------------|----------|---------|
| `tag-name` | Name of the tag to delete | Yes | |
| `org-name` | The name of the GitHub organization | Yes | |
| `repo-name` | The name of the repository | Yes | |
| `token` | GitHub token with access to Git tags | Yes | |
## Outputs
| Name | Description |
|-----------------|----------------------------------------------------------------------------------------------|
| `result` | Result of the attempt to delete the git tag (`success`, `not-found`, or `failure`) |
| `error-message` | Error message if the action fails |
## Usage
Create a workflow file in your repository (e.g., `.github/workflows/delete-tag.yml`).
**Ensure you pass all required inputs and use a valid token with tag deletion access.**
### Example Workflow
```yaml
name: Delete Git Tag
on:
workflow_dispatch:
jobs:
delete-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Delete Git Tag via API
id: delete-tag
uses: lee-lott-actions/delete-git-tag@v1
with:
tag-name: 'v1.0.0'
repo-name: ${{ github.event.repository.name }}
org-name: ${{ github.repository_owner }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Output Delete Result
run: |
echo "Delete Result: ${{ steps.delete-tag.outputs.result }}"
echo "Error Message: ${{ steps.delete-tag.outputs.error-message }}"
```