From 3446fb83f11a18af7b1c65b3cbd1e19d20d14d76 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Thu, 8 Apr 2021 18:15:54 +0100 Subject: [PATCH] CI: add check for Docker image consistency Otherwise it might cause weird build errors --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7be111c14b7..1234cf5d9df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,9 @@ on: paths-ignore: - '*.md' +env: + CLOJURE_VERSION: '1.10.1.727' + jobs: test: @@ -44,10 +47,15 @@ jobs: with: node-version: '12' + - name: Check Dockerfile consistency + run: | + DOCKER_VERSION=$(grep -Po 'FROM clojure:.*-deps-?\K(.*)' Dockerfile) + [[ $CLOJURE_VERSION == $DOCKER_VERSION ]] || { echo "Please make sure Docker container version matches CLOJURE_VERSION" && exit 1; } + - name: Install Clojure tools.deps uses: DeLaGuardo/setup-clojure@master with: - cli: '1.10.1.727' + cli: ${{ env.CLOJURE_VERSION }} - name: Fetch Maven deps if: steps.maven-cache.outputs.cache-hit != 'true'