Drone plugin to run pre-commit hooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
IamTheFij 642e37dc27 Base: pre-commit patch version bump 10 months ago
scripts Personal: Update golangci-lint 10 months ago
.drone.yml Add personal image with hadolint 1 year ago
.pre-commit-config.yaml Add tests 1 year ago
Dockerfile Base: pre-commit patch version bump 10 months ago
Dockerfile.personal Install golang from tar 10 months ago
LICENSE Initial commit 1 year ago
Makefile Remove tests script and replace by testing with personal image 10 months ago
Readme.md Update readme with new included dependencies 10 months ago

Readme.md

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.