From 4e9ec84cde789b756992b30b880b9d3cd8e4b417 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 5 Jun 2023 10:08:53 +0300 Subject: [PATCH] add .cache to .gitignore && .gitlab-ci.yml imported from gist --- .gitignore | 1 + .gitlab-ci.yml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitignore b/.gitignore index 722b198..fff0615 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ keys.txt.asc .jekyll-cache vendor/ *_original +.cache/** diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..467e681 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2023 Aminda Suomalainen +# +# 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}