diff --git a/.github/workflows/conventional_commits.yml b/.github/workflows/conventional_commits.yml index 7db4b72025d2982a6e3585f51d4e3abd02d13c4b..02939fc7d7b70f6691466de6e19ce35f919ffa5a 100644 --- a/.github/workflows/conventional_commits.yml +++ b/.github/workflows/conventional_commits.yml @@ -15,11 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Validate - uses: CondeNast/conventional-pull-request-action@v0.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - commitlintRulesPath: "./commitlint.config.js" - commitTitleMatch: "false" - ignoreCommits: "false" + - name: Install commitlint + run: | + npm install @commitlint/cli @commitlint/config-conventional + - name: Fetch merge commit message + id: merge_commit + run: | + MERGE_COMMIT_MESSAGE=$(git log --merges -n 1 --pretty=format:"%s") + echo "::set-output name=message::$MERGE_COMMIT_MESSAGE" + - name: Validate merge commit message + run: | + echo "${{ steps.merge_commit.outputs.message }}" | npx commitlint