mirror of
https://github.com/lexmount/moli.git
synced 2026-11-14 00:08:12 +00:00
32 lines
913 B
YAML
32 lines
913 B
YAML
name: Cancel closed PR CI
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [closed]
|
|
|
|
# Run trusted default-branch code so closing an unmerged or fork PR can also
|
|
# cancel its validation. CI revisions otherwise run independently.
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
jobs:
|
|
cancel:
|
|
name: Cancel closed PR validation
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout trusted cancellation helper
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
ref: ${{ github.event.repository.default_branch }}
|
|
|
|
- name: Cancel unfinished PR CI runs
|
|
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
|
|
with:
|
|
script: |
|
|
const { cancelClosedPrCi } = require('./.github/scripts/cancel-pr-ci.cjs');
|
|
await cancelClosedPrCi({ github, context, core });
|