mirror of
https://github.com/netbirdio/advisory-database.git
synced 2026-05-22 18:04:22 -07:00
Delete staging and head branches on PR close
This commit is contained in:
+6
-4
@@ -1,4 +1,4 @@
|
||||
name: Delete PR staging branch
|
||||
name: Delete PR staging and head branches
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
@@ -9,14 +9,16 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
delete-staging-branch:
|
||||
delete-staging-and-head-branches:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: delete staging branch
|
||||
- name: Delete staging and head branches
|
||||
env:
|
||||
STAGING_BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||
HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -xeo pipefail
|
||||
git push origin --delete $STAGING_BRANCH
|
||||
git push origin --delete --force $STAGING_BRANCH
|
||||
git push origin --delete --force $HEAD_BRANCH
|
||||
Reference in New Issue
Block a user