Verifies the action/workflow event trigger was a tag push event.
Optionally, checks tag compliance with a given versioning type.
Checks the pushed tag against these versioning types:
Can optionally disable versioning compliance checks.
steps:
- name: 'Verify Pushed Tag'
uses: lfreleng-actions/tag-push-verify-action@main
with:
versioning: 'calver'
exit_on_fail: 'false'
The validated tag comes from: ${{ github.ref_name }}
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.
The "versioning" input string must match one of the options below:
Versioning | Description |
---|---|
semver | Semantic versioning |
calver | Calendar versioning |
none | No tag validation performed |
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.