add .cache to .gitignore && .gitlab-ci.yml imported from gist

This commit is contained in:
Aminda Suomalainen 2023-06-05 10:08:53 +03:00
parent ffc674166b
commit 4e9ec84cde
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 21 additions and 0 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ keys.txt.asc
.jekyll-cache .jekyll-cache
vendor/ vendor/
*_original *_original
.cache/**

20
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2023 Aminda Suomalainen <suomalainen+git@mikaela.info>
#
# SPDX-License-Identifier: CC0-1.0
# Based on https://pre-commit.com
image: python:alpine
gitlab-ci-pre-commit:
stage: build
before_script:
- apk add --no-cache git gcc musl-dev go exiftool
- pip install pre-commit
script:
- pre-commit run --all-files --show-diff-on-failure
variables:
# Remember to gitignore .cache/**
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
TERM: dumb
cache:
paths:
- ${PRE_COMMIT_HOME}