Skip to content

Prune GitHub repo tags #96

Prune GitHub repo tags

Prune GitHub repo tags #96

Workflow file for this run

name: Prune GitHub repo tags
on:
workflow_dispatch:
inputs:
older-than:
description: Tags older than the specified number of days will be deleted
required: true
ignore:
description: Regex of tags to ignore
simulation:
type: boolean
description: Simulate a run (don't delete tags)
schedule:
- cron: '0 0 * * 0'
jobs:
prune-tags:
name: Prune tags
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo with all tags
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Prune tags (scheduled)
if: github.event_name == 'schedule'
uses: nrkno/sofie-github-workflows/.github/actions/tag-pruner@tag-pruner-v1
with:
older-than: 30
ignore: '[0-9]+\.[0-9]+\.[0-9]+.*'
simulation: false
- name: Prune tags (manual)
if: github.event_name == 'workflow_dispatch'
uses: nrkno/sofie-github-workflows/.github/actions/tag-pruner@tag-pruner-v1
with:
older-than: ${{ github.event.inputs.older-than }}
ignore: ${{ github.event.inputs.ignore }}
simulation: ${{ github.event.inputs.simulation }}