Skip to content

Clean Workflows

Clean Workflows #11634

# This is a basic workflow to help you get started with Actions
name: Clean Workflows
# Controls when the workflow will run
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 * * * *'
workflow_dispatch:
env:
# Setting an environment variable with the value of a configuration variable
env_var: ${{ vars.ENV_CONTEXT_VAR }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Delete workflow runs
uses: SchulzeStTSI/delete-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
check_pullrequest_exist: true
keep_minimum_runs: 2