From fbc03a7bb38e949f7fed584560e74d2b81a14f57 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Wed, 22 Nov 2023 19:46:29 +0100 Subject: [PATCH] ci: check commit message before anything else --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .github/workflows/pull-request.yml | 20 -------------------- 2 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 234a9cbc..cae787aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,25 @@ on: pull_request: jobs: + check_commit: + name: Check Commit Message + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # A PR should not contain too many commits + fetch-depth: 10 + - name: Validate commit messages + run: | + git show-ref + curl -sSfL https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip | zcat > convco + chmod +x convco + ./convco check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} + rm convco + linux_dbus: name: linux (matrixed) + needs: check_commit runs-on: ubuntu-latest strategy: matrix: @@ -47,6 +64,7 @@ jobs: windows: name: windows + needs: check_commit runs-on: windows-latest strategy: matrix: @@ -78,6 +96,7 @@ jobs: macos: name: macos + needs: check_commit runs-on: macos-latest strategy: matrix: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index 4b9120df..00000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Pull request -# This workflow is triggered on pushes to the repository. -on: [ pull_request ] - -jobs: - check: - name: Check Commit Message - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - # A PR should not contain too many commits - fetch-depth: 10 - - name: Validate commit messages - run: | - git show-ref - curl -sSfL https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip | zcat > convco - chmod +x convco - ./convco check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} - rm convco