diff --git a/.github/workflows/lefthook-precommit.yml b/.github/workflows/lefthook-precommit.yml new file mode 100644 index 0000000..0173fe7 --- /dev/null +++ b/.github/workflows/lefthook-precommit.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: Copyright Boozt Fashion, AB +# SPDX-License-Identifier: MIT +--- +name: Lefthook [pre-commit] +"on": [pull_request] +jobs: + lefthook: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v2 + - name: Install Package + # yamllint disable-line rule:line-length + run: curl -1sLf 'https://dl.cloudsmith.io/public/evilmartians/lefthook/setup.deb.sh' | sudo -E bash + - name: Install Lefthook + run: sudo apt install lefthook && lefthook install + - name: Run Lefthook + run: lefthook run pre-commit diff --git a/.lefthook.yaml b/.lefthook.yaml index c74dd7c..3ecb0ac 100644 --- a/.lefthook.yaml +++ b/.lefthook.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT --- remotes: - - git_url: git@github.com:boozt-platform/lefthook + - git_url: https://github.com/boozt-platform/lefthook.git ref: v1.3.0 configs: # lint commit messages based by the conventional commits