[pre-commit.ci] pre-commit autoupdate #23
Workflow file for this run
This file contains 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: Close invalid PR | |
# Close the invalid PR, add 'invalid' label, and post a message. | |
# PR is considered invalid if: | |
# * base is 'python:main' | |
# * head is '<username>:<maint_branch>' matching the version regex | |
# Only for PRs opened against main | |
on: | |
pull_request_target: | |
types: [opened] | |
branches: | |
- main | |
jobs: | |
run: | |
# Only for PRs created in the CPython org | |
if: github.repository_owner == 'hugovk' # TODO cpython | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check source branch | |
id: check-branch | |
run: | | |
if [[ ${{ github.head_ref }} =~ ^\d+\.\d+$ ]]; then | |
echo ::set-output name=match::true | |
echo 123 | |
fi | |
echo 789 | |
- name: Build | |
if: steps.check-branch.outputs.match == 'true' | |
run: | | |
echo "Branch is a match" | |
# - uses: superbrothers/close-pull-request@v3 | |
# with: | |
# comment: "PRs attempting to merge a maintenance branch into the | |
# main branch are deemed to be spam and automatically closed. | |
# If you were attempting to report a bug, please go to | |
# https://github.com/python/cpython/issues; | |
# see devguide.python.org for further instruction as needed." |