https://github.com/around25/docker-precommit-base
A docker image that allows you to run pre-commit checks for Python, Node or Go
https://github.com/around25/docker-precommit-base
Last synced: 6 months ago
JSON representation
A docker image that allows you to run pre-commit checks for Python, Node or Go
- Host: GitHub
- URL: https://github.com/around25/docker-precommit-base
- Owner: Around25
- License: mit
- Created: 2020-01-09T12:01:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-17T06:00:26.000Z (almost 4 years ago)
- Last Synced: 2025-05-15T16:17:18.941Z (about 1 year ago)
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-precommit-base
A docker image that allows you to run pre-commit checks for Python, Node or Go in a Gitlab CI job.
## Usage
The image can be used as a base for your Gitlab CI jobs in order to run all the pre-commit checks defined in the configuration file.
```
image:
name: "Around25/docker-precommit-base"
stages:
- code_check
code_check:
stage: code_check
variables:
script:
# install precommit check
- pre-commit install
# optionally install dependencies
- go get github.com/fzipp/gocyclo
- go get -u golang.org/x/lint/golint
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.22.2
# run the check
- pre-commit run --all-files
```