From 36558fff88cbfcbe0e58c42d9be640fcc9a8a4d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Mon, 13 Nov 2023 11:53:38 +0100 Subject: [PATCH 1/2] Fix non-existent docs directory --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 40884c14..529d48a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,6 +84,7 @@ RUN make souffle # copy and build the assets COPY --chown=${USER} assets ./assets +RUN mkdir docs RUN make build-assets USER root From 14c6d722dc06d9f83ccb7b9231e2e6edbe2b45d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Tue, 21 Nov 2023 00:05:09 +0100 Subject: [PATCH 2/2] Separate workflows for testing image build and pushing --- .github/workflows/docker-image.yml | 6 +----- .github/workflows/test-docker-image.yml | 17 +++++++++++++++++ Dockerfile | 5 ++--- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/test-docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6c68ed44..0f0eb1b5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,12 +1,8 @@ name: Publish Docker Image on: - pull_request: - paths: - - Dockerfile - - docker-compose.yml - - scripts/.zshrc push: + branches: ["development"] paths: - Dockerfile - docker-compose.yml diff --git a/.github/workflows/test-docker-image.yml b/.github/workflows/test-docker-image.yml new file mode 100644 index 00000000..bc31d652 --- /dev/null +++ b/.github/workflows/test-docker-image.yml @@ -0,0 +1,17 @@ +name: Test Docker Image + +on: + pull_request: + branches: ["main", "development"] + 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