homepage/.pre-commit-config.yaml
wanderer cfe496dcb7
Some checks failed
continuous-integration/drone/push Build is failing
embed homepage in a Go app (#33)
the entire './public' folder that Hugo produces is embedded into a
variable of 'embed.FS' type and served directly using the default http
mux that Go std offers.

ci, pre-commit, Dockerfile and compose file have all been updated
accordingly.

nginx is no longer needed to front the site files, which enabled
switching to a SCRATCH image containing just a single statically linked
"homepage" app that has all files (html, css, js) embedded.
the containers are otherwise empty (as the name SCRATCH suggests), which
further decreases potential attack surface area.

Co-authored-by: surtur <a_mirre@utb.cz>
Reviewed-on: #33
2022-08-08 15:20:50 +02:00

30 lines
761 B
YAML

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
exclude: .drone.yml # drone's yaml is somewhat strange sometimes
- repo: local
hooks:
- id: check-compose-file
name: check compose file
language: system
entry: docker-compose -f docker-compose.yml config
pass_filenames: false
- id: yamllint
name: yamllint
language: system
entry: yamllint .
pass_filenames: false
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.0
hooks:
- id: go-mod-tidy
- id: go-unit-tests
- id: golangci-lint
- id: go-build
...