gitea-actions/gitea-tag/action.yml
Cal Corum 4c31a04187 Add README and usage headers to all composite actions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:52:36 -05:00

45 lines
1.3 KiB
YAML

# Gitea Tag Creator
# Creates a git tag via the Gitea API (avoids branch protection issues)
#
# Usage:
# - uses: cal/gitea-actions/gitea-tag@main
# with:
# version: ${{ steps.calver.outputs.version }}
# token: ${{ secrets.GITEA_TOKEN }}
name: Create Gitea Tag
description: Create a git tag via the Gitea API
inputs:
version:
description: Tag name / version string
required: true
token:
description: Gitea API token (usually github.token)
required: true
server_url:
description: Gitea server URL
required: false
default: ${{ github.server_url }}
repository:
description: Repository path (owner/repo)
required: false
default: ${{ github.repository }}
sha:
description: Commit SHA to tag
required: false
default: ${{ github.sha }}
runs:
using: composite
steps:
- name: Create tag via Gitea API
shell: bash
run: |
curl -s -X POST \
-H "Authorization: token ${{ inputs.token }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"${{ inputs.version }}\", \"target\": \"${{ inputs.sha }}\", \"name\": \"${{ inputs.version }}\"}" \
"${{ inputs.server_url }}/api/v1/repos/${{ inputs.repository }}/tags"
echo "Created tag ${{ inputs.version }}"