https://github.com/actalog/create-datetime-tag
🏷️📆 Creates and pushes a git tag based on the current date and time
https://github.com/actalog/create-datetime-tag
date datetime git release tags time
Last synced: 3 months ago
JSON representation
🏷️📆 Creates and pushes a git tag based on the current date and time
- Host: GitHub
- URL: https://github.com/actalog/create-datetime-tag
- Owner: actalog
- License: unlicense
- Created: 2025-12-25T23:23:13.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-03-22T16:21:39.000Z (3 months ago)
- Last Synced: 2026-03-23T06:51:17.582Z (3 months ago)
- Topics: date, datetime, git, release, tags, time
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @actalog/create-datetime-tag
Creates and pushes a git tag based on the current date and time (format: `YYYY-MM-DD.HH-mm-ss`).
## Features ✨
- **Precision:** Uses seconds to reduce tag collisions.
- **Idempotency:** Automatically skips tag creation and push if a tag with the same name already exists, preventing workflow failures.
- **Automated:** Configures the git user as `github-actions[bot]`.
## Usage 🚀
Create a workflow file (e.g., `.github/workflows/tag.yml`) with the following content:
```yaml
name: Generate Tag
on:
push:
branches:
- main
permissions:
contents: write # Required to push tags back to the repository
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Datetime Tag
id: create-tag
uses: actalog/create-datetime-tag@v1
- name: Output Tag
run: echo "The tag created is ${{ steps.create-tag.outputs.tag }}"
```
## Outputs 📤
| Name | Description |
| :--- | :--- |
| `tag` | The created tag name (e.g., `2025-03-22.12-55-10`) |