mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 20:26:33 +00:00
25 lines
566 B
YAML
25 lines
566 B
YAML
name: Cancel Runs On Branch Delete
|
|
|
|
on:
|
|
delete:
|
|
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
|
|
jobs:
|
|
cancel-branch-runs:
|
|
if: ${{ github.event.ref_type == 'branch' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Cancel active workflow runs for deleted branch
|
|
shell: bash
|
|
env:
|
|
BRANCH: ${{ github.event.ref }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
REPOSITORY: ${{ github.repository }}
|
|
run: bash scripts/github/cancel_deleted_branch_runs.sh
|