Skip to content

Commit

Permalink
ci: fix image build target
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Nov 19, 2024
1 parent 5c979fa commit cd1271e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ ARG GHC_VERSION
ARG CABAL_VERSION

LABEL org.opencontainers.image.source=https://github.com/spex-lang/spex
LABEL org.opencontainers.image.description=
"The Spex specification language and toolkit static build image"
LABEL org.opencontainers.image.description="The Spex specification language and toolkit static build image"
LABEL org.opencontainers.image.licenses=BSD-2-Clause

# Install system dependencies needed for ghcup.
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ GITHUB_EVENT_BEFORE =? origin/main

DOCKERFILE_CHANGED := $(shell \
git diff --name-only "$(GITHUB_EVENT_AFTER)" "$(GITHUB_EVENT_BEFORE)" \
| grep Dockerfile && echo true || echo false)
| grep --quiet "^Dockerfile$$" && echo true || echo false)

.PHONY: pull-image build-image push-image

Expand All @@ -277,9 +277,10 @@ pull-image:
docker pull ghcr.io/spex-lang/spex-build:latest
endif

build-image: Dockerfile
build-image:
echo "DOCKERFILE_CHANGED=$(DOCKERFILE_CHANGED)"
ifeq ($(DOCKERFILE_CHANGED),true)
docker build --tag ghcr.io/spex-lang/spex-build:latest .
docker build --tag ghcr.io/spex-lang/spex-build:latest .
endif

push-image:
Expand Down

0 comments on commit cd1271e

Please sign in to comment.