From 18ac3fa53cb7e0215973b17c9bf86bb8c240dd1d Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 14 Jul 2023 08:47:41 +0200 Subject: [PATCH] feat(ci): Lint conventional commits --- .github/workflows/conventional_commits.yaml | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/conventional_commits.yaml diff --git a/.github/workflows/conventional_commits.yaml b/.github/workflows/conventional_commits.yaml new file mode 100644 index 00000000..bfc5fa34 --- /dev/null +++ b/.github/workflows/conventional_commits.yaml @@ -0,0 +1,22 @@ +name: Conventional commits +on: + pull_request: + +jobs: + conventional-commits: + name: Conventional commits + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} + + - name: Install dart + uses: dart-lang/setup-dart@v1 + - name: Install commitlint_cli + run: dart pub get + + - name: Lint conventional commits + run: dart run commitlint_cli --from="origin/${{ github.base_ref }}" --to="${{ github.head_ref }}"