diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6c68ed44..d3669638 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,11 +1,6 @@ name: Publish Docker Image on: - pull_request: - paths: - - Dockerfile - - docker-compose.yml - - scripts/.zshrc push: paths: - Dockerfile diff --git a/.github/workflows/test-docker-image.yml b/.github/workflows/test-docker-image.yml new file mode 100644 index 00000000..c5f7e7ce --- /dev/null +++ b/.github/workflows/test-docker-image.yml @@ -0,0 +1,16 @@ +name: Test Docker Image + +on: + pull_request: + paths: + - Dockerfile + - docker-compose.yml + - scripts/.zshrc + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build the hello-docker Docker image + run: make docker-build diff --git a/Dockerfile b/Dockerfile index 529d48a1..ca49a0c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG GID=1000 ARG UID=1000 ARG ghc_version=9.4.5 -ARG cabal_version=3.10.1.0 +ARG cabal_version=3.10.2.0 # generate a working directory USER "root" @@ -41,7 +41,6 @@ RUN chmod ugo+x /home/$USER/.cabal USER ${USER} RUN git config --global --add safe.directory "*" -RUN ls -lh /home/$USER/.cabal RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh @@ -84,7 +83,7 @@ RUN make souffle # copy and build the assets COPY --chown=${USER} assets ./assets -RUN mkdir docs +COPY --chown=${USER} docs ./docs RUN make build-assets USER root