Kavita/.github/workflows/pr-check.yml
2023-09-04 07:01:37 -07:00

30 lines
927 B
YAML

name: Validate PR Body
on:
push:
branches: '**'
pull_request:
branches: [ main, develop, canary ]
types: [synchronize]
jobs:
test:
name: Test trigger
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.base.ref == 'develop'
steps:
- name: Echo
run: echo 'Triggered'
check_pr:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Check PR Body
uses: JJ/github-pr-contains-action@releases/v10
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
bodyDoesNotContain: "[\"|`]"