feat: add lefthook [pre-commit] CI pipeline #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 Git | |
run: sudo apt-get install git | |
- 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 | |
- name: Install Hooks | |
run: | | |
ls -la | |
lefthook install | |
lefthook dump | |
- name: Run Lefthook | |
run: lefthook run pre-commit |