.github/workflows/main.yml
name: Enforce Git Rules
on:
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, edited ]
jobs:
rebase_job:
runs-on: ubuntu-latest
name: Enforce rebasing
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Is Rebased on main?
uses: cyberark/enforce-rebase@v2
with:
default-branch: main
commit_style:
runs-on: ubuntu-latest
name: Enforce commit style
steps:
- name: Checkout the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check commit style
uses: cyberark/enforce-commit-style@v1
with:
subject-length: 72