Drone plugin to run pre-commit hooks
Go to file
Ian Fijolek dba73a68e3
All checks were successful
continuous-integration/drone/push Build is passing
Ensure goimports is installed
2024-01-03 21:36:18 -08:00
scripts Make sure system is linux for docker-compose 2023-10-26 14:42:28 -07:00
.drone.yml Add personal image with hadolint 2020-09-08 13:20:54 -07:00
.pre-commit-config.yaml Update hadolint hook 2022-11-04 15:01:56 -07:00
Dockerfile Bump pre-commit to 3.5.0 2023-10-26 14:26:04 -07:00
Dockerfile.personal Ensure goimports is installed 2024-01-03 21:36:18 -08:00
LICENSE Initial commit 2020-09-08 10:02:15 -07:00
Makefile Remove tests script and replace by testing with personal image 2021-02-05 12:33:29 -08:00
Readme.md Update readme with new included dependencies 2021-02-05 12:30:14 -08:00

drone-pre-commit

A pre-commit plugin, for the drone.io project, which allows you to run pre-commit checks as part of your build steps.

Examples

An example configuration would be as follows:

steps:
  - name: run checks
    image: iamthefij/drone-pre-commit:latest

Or, if you have additional dependencies to install

steps:
  - name: run ruby dependent checks
    image: iamthefij/drone-pre-commit:latest
    commands:
      - apt-get update
      - apt-get install -y --no-install-recommends ruby
      # You must run your own pre-commit command at the end
      - pre-commit run --all-files

Personal image

A second image is also built for my personal use, but it may be useful to you as well. This image includes the following dependencies:

  • hadolint
  • golang
  • golangci-lint

Installation scripts referencing versions are found in ./scripts.