From b13005d24f322d91e26f6343665128ca431e96fa Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 8 Nov 2022 15:19:56 +0100 Subject: Add commit-lint workflow Signed-off-by: Matthias Beyer --- .github/workflows/commit-lint.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/commit-lint.yml diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml new file mode 100644 index 0000000..5e6e22d --- /dev/null +++ b/.github/workflows/commit-lint.yml @@ -0,0 +1,25 @@ +on: + pull_request: + +name: Pull Request Checks + +jobs: + block-fixup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Block fixup commit merge + uses: 13rac1/block-fixup-merge-action@v2.0.0 + + commit-lint: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: '3.x' + - run: pip install gitlint + - run: gitlint --commits $(git merge-base origin/master HEAD)..HEAD -- cgit v1.2.3