Skip to content

Git tags

Git tags #223

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Git tags"
on: # yamllint disable-line rule:truthy
delete: null
push:
tags:
- "**"
workflow_call: null
permissions: {} # yamllint disable-line rule:braces
#permissions: "read-all"
#permissions:
# contents: "read" # Private repositories need read permission
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
double_tag:
name: "Tag without new commit"
runs-on: "ubuntu-22.04"
timeout-minutes: 1
steps:
-
name: "Checkout repository"
uses: "actions/[email protected]"
with:
fetch-depth: 0
-
name: "List commits with multiple tags"
run: |
DUPLICATES="$(git show-ref --tags --hash=7 | sort | uniq --repeated)"
if [ -n "${DUPLICATES}" ]; then
echo "::error::Commit with multiple tags"
echo "${DUPLICATES}"
exit 10
fi