Skip to content

Delete tags greater than v12.0 #2

Delete tags greater than v12.0

Delete tags greater than v12.0 #2

Workflow file for this run

name: Delete tags greater than v12.0
on:
create:
tags:
- v*
jobs:
delete-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Delete tag
run: |
TAG_NAME=${{ github.ref }}
TAG_VERSION=${TAG_NAME#refs/tags/v}
MIN_VERSION="12.0"
if (( $(echo "$TAG_VERSION > $MIN_VERSION" | bc -l) )); then
echo "Deleting tag $TAG_NAME"
git tag -d $TAG_NAME
git push origin :refs/tags/$TAG_NAME
fi