Skip to content

Commit

Permalink
Separate workflows for testing image build and pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
tchoutri committed Nov 21, 2023
1 parent 36558ff commit febe4dd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Publish Docker Image

on:
pull_request:
paths:
- Dockerfile
- docker-compose.yml
- scripts/.zshrc
push:
paths:
- Dockerfile
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test-docker-image.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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


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

0 comments on commit febe4dd

Please sign in to comment.