Skip to content

lfreleng-actions/tag-push-verify-action

Repository files navigation

🏷️ Verify Pushed Tag

Verifies the action/workflow event trigger was a tag push event.

Optionally, checks tag compliance with a given versioning type.

tag-push-verify-action

Supported Versioning Types

Checks the pushed tag against these versioning types:

Can optionally disable versioning compliance checks.

Usage Example

steps:
  - name: 'Verify Pushed Tag'
    uses: lfreleng-actions/tag-push-verify-action@main
    with:
      versioning: 'calver'
      exit_on_fail: 'false'

Tag

The validated tag comes from: ${{ github.ref_name }}

Inputs

Input Name Required Default Description
versioning False semver Check tag compliance with versioning type [semver/calver/none]
exit_on_fail False true Exit with error if tag fails versioning compliance check

The action will always exit with an error if a tag push event did not trigger the action/workflow run. When "exit_on_fail" set false, the versioning type/compliance check generates a warning rather than an error.

Versioning Types

The "versioning" input string must match one of the options below:

Versioning Description
semver Semantic versioning
calver Calendar versioning
none No tag validation performed

Outputs

Output Name Description
valid Set based on the validation results: true/false/untested
tag Set to the pushed tag value ${{ github.ref_name }}

Note: also exports the pushed tag to the environment.

About

Verifies the action/workflow event trigger was a tag push event

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •