Skip to content

Commit

Permalink
CI: add check for Docker image consistency
Browse files Browse the repository at this point in the history
Otherwise it might cause weird build errors
  • Loading branch information
karlicoss authored and tiensonqin committed Apr 9, 2021
1 parent d28b728 commit 3446fb8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -10,6 +10,9 @@ on:
paths-ignore:
- '*.md'

env:
CLOJURE_VERSION: '1.10.1.727'

jobs:

test:
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 3446fb8

Please sign in to comment.