name: Closing PR on: pull_request_target: types: [ closed ] defaults: run: shell: bash jobs: cleanup: name: Cleanup runs-on: Ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2 id: checkout with: fetch-depth: 0 - name: Cleanup Flex testing endpoint run: | git branch -r --list 'origin/flex-pull-${{ github.event.number }}/*' \ | sed 's/[^/]*\//:/' \ | xargs -r git push origin :flex/pull-${{ github.event.number }} || true