From b857119ad27cc96a6fe809aba88ce59a948e530e Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 19 Dec 2020 14:25:18 +0200
Subject: [PATCH] GitLab CI.

Just pre-commit actually (the build happens in Docker Hub).
---
 .gitlab-ci.yml | 17 +++++++++++++++++
 README.md      |  2 ++
 2 files changed, 19 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..ec99144
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,17 @@
+---
+stages:
+  - test
+
+pre-commit:
+  stage: test
+  image: adarnimrod/ci-images:pre-commit
+  variables:
+    XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
+    # Disabled until https://github.com/pre-commit/pre-commit/issues/1387 is
+    # resolved.
+    SKIP: "hadolint,docker-compose"
+  script:
+    - pre-commit run --all-files
+  cache:
+    paths:
+      - .cache/
diff --git a/README.md b/README.md
index 5b176a3..1b6ff82 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # Hitch Docker image
 
+ [![pipeline status](https://git.shore.co.il/nimrod/hitch-docker/badges/master/pipeline.svg)](https://git.shore.co.il/nimrod/hitch-docker/-/commits/master)
+
 ## Usage example
 
 ```
-- 
GitLab