name: Cleanup Duplicate CI Runs

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    - cron:  '*/5 * * * *'

jobs:
  cleanup-prs:
    if: github.repository == 'quarkusio/quarkus'
    name: "Cleanup Duplicate PRs"
    runs-on: ubuntu-latest
    steps:
      - uses: n1hility/cancel-previous-runs@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          workflow: ci-actions.yml
