Arthur Update README.md #9
This file contains hidden or 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: Cancel PR Workflows on Merge | |
| on: | |
| pull_request_target: | |
| types: [closed] # runs when the PR is closed (merged or not) | |
| permissions: | |
| actions: write # lets the workflow cancel other runs | |
| jobs: | |
| cancel: | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cancel previous PR runs | |
| uses: styfle/cancel-workflow-action@0.12.1 | |
| with: | |
| workflow_id: all # cancel every workflow in this repo | |
| access_token: ${{ github.token }} # default token is fine | |
| ignore_sha: true # required for pull_request.closed events | |
| pr_number: ${{ github.event.pull_request.number }} | |