name: Cancel previous jobs

on:
  workflow_call:

jobs:
  cancel:
    name: run
    runs-on: ubuntu-24.04
    timeout-minutes: 3
    steps:
      - uses: styfle/cancel-workflow-action@0.11.0
        with:
          all_but_latest: true
          access_token: ${{ github.token }}
        if: ${{ github.ref != 'refs/heads/master' }}
