Wsteam1 cta refactor #39569
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Cancel Previous CI Runs | |
on: | |
create: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
push: | |
branches: | |
- latest | |
permissions: | |
contents: read | |
jobs: | |
cleanup-runs: | |
permissions: | |
actions: write # for rokroskar/workflow-run-cleanup-action to obtain workflow name & cancel it | |
contents: read # for rokroskar/workflow-run-cleanup-action to obtain branch | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/workflow-run-cleanup-action@master | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
if: "github.ref != 'refs/heads/latest'" |