This action delete all tags until specific tags. This can specify sending or get from the last closed PR.
Token to use to push to the repo. Pass in using secrets.GITHUB_TOKEN
:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Regex to validate tags:
with:
TAG_REGEX: test-\\d*
Important: If the patter have the symbol '\', please cap this with another '\'.
Example
ERROR:
test-\d*
OK:test-\\d*
Tag to considerate to delete all until this tag (this not included):
with:
UNTIL: test-1
With this parameter check the last PR to this branch, and get the head branch if is a valid tag remove all valid tags until this (this not included), if not a valid tag remove all valid tags:
with:
PR_BASE_BRANCH: staging
PR_BASE_BRANCH or UNTIL is needed, if both setted UNTIL parameter is more important.
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Tagging
uses: steplix/cicd-delete-tags@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_REGEX: test-\\d*