Skip to content

actalog/create-datetime-tag

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@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:

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)

About

πŸ·οΈπŸ“† Creates and pushes a git tag based on the current date and time

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors