From 7d4d4c285f456a1882c054e0b0eac1c0029d3f3f Mon Sep 17 00:00:00 2001 From: Tristan Jugdev Date: Thu, 23 Oct 2025 11:57:04 -0600 Subject: [PATCH 1/5] Update fourmolu --- src/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dockerfile b/src/Dockerfile index 10cf8f5..54d5e1f 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -4,7 +4,7 @@ FROM fossa/haskell-static-alpine:ghc-9.8.2 AS builder-9.8 # By installing these separately, we prevent the dependecies of one package from conflicting with the others RUN cabal update && \ cabal install --install-method=copy hlint-3.8 && \ - cabal install --install-method=copy fourmolu-0.16.2.0 && \ + cabal install --install-method=copy fourmolu-0.19.0.1 && \ cabal install --install-method=copy cabal-fmt-0.1.12 FROM fossa/haskell-static-alpine:ghc-9.0.2 AS builder-9.0 From 304b45349a9cdb8b7f4839b2e55eff9db72a9057 Mon Sep 17 00:00:00 2001 From: Tristan Jugdev Date: Thu, 23 Oct 2025 14:01:06 -0600 Subject: [PATCH 2/5] Multi-platform build and use GHC 9.8.4 --- .github/workflows/publish.yml | 6 +++++- .github/workflows/pull-request.yml | 16 ++++++++++------ README.md | 5 +++++ src/Dockerfile | 11 ++--------- src/update-dev-tools.sh | 2 -- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5748d7e..d6f0401 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,6 +23,9 @@ jobs: username: fossabot password: ${{ github.token }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -37,11 +40,12 @@ jobs: - name: Build and push image uses: docker/build-push-action@v2 with: - tags: 'ghcr.io/fossas/haskell-dev-tools:9.8.2' + tags: 'ghcr.io/fossas/haskell-dev-tools:9.8.4' push: true context: ./src cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new + platforms: linux/amd64,linux/arm64 - # Temp fix # https://github.com/docker/build-push-action/issues/252 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3fc2a79..96538a6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - + steps: - uses: actions/checkout@v2 @@ -36,12 +36,12 @@ jobs: - name: run shellcheck run: shellcheck **/*.*sh - + docker-lint: runs-on: ubuntu-latest permissions: contents: read - + steps: - uses: actions/checkout@v2 @@ -53,11 +53,14 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - + steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 @@ -72,7 +75,7 @@ jobs: - name: Get git short hash id: shorthash run: | - echo "::set-output name=shorthash::$(git rev-parse --short HEAD)" + echo "::set-output name=shorthash::$(git rev-parse --short HEAD)" - name: Build and push uses: docker/build-push-action@v2 @@ -82,6 +85,7 @@ jobs: tags: ${{ format('haskell-dev-tools-test:{0}', steps.shorthash.outputs.shorthash) }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new + platforms: linux/amd64,linux/arm64 - # Temp fix # https://github.com/docker/build-push-action/issues/252 @@ -89,4 +93,4 @@ jobs: name: Move cache run: | rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache \ No newline at end of file + mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/README.md b/README.md index aa77499..4fb3562 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ fossas/fossa-cli repo. ## Changelog +### GHC 9.8.4 + +- GHC is now version 9.8.4 +- cabal-install is now 3.12.1.0 + ### GHC 9.8.2 - GHC is now version 9.8.2 diff --git a/src/Dockerfile b/src/Dockerfile index 54d5e1f..cd6db9f 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,5 +1,4 @@ -# Build all tools except hadolint. -FROM fossa/haskell-static-alpine:ghc-9.8.2 AS builder-9.8 +FROM fossa/haskell-static-alpine:ghc-9.8.4 AS builder-9.8 # By installing these separately, we prevent the dependecies of one package from conflicting with the others RUN cabal update && \ @@ -7,17 +6,11 @@ RUN cabal update && \ cabal install --install-method=copy fourmolu-0.19.0.1 && \ cabal install --install-method=copy cabal-fmt-0.1.12 -FROM fossa/haskell-static-alpine:ghc-9.0.2 AS builder-9.0 - -RUN cabal update && \ - cabal install --install-method=copy hadolint-2.12.0 - # Copy the built binaries into a smaller image. -FROM fossa/haskell-static-alpine:ghc-9.8.2 AS final +FROM fossa/haskell-static-alpine:ghc-9.8.4 AS final LABEL org.opencontainers.image.source = "https://github.com/fossas/haskell-dev-tools" COPY --from=builder-9.8 /root/.local/bin/hlint /root/.cabal/bin/hlint COPY --from=builder-9.8 /root/.local/bin/fourmolu /root/.cabal/bin/fourmolu COPY --from=builder-9.8 /root/.local/bin/cabal-fmt /root/.cabal/bin/cabal-fmt -COPY --from=builder-9.0 /root/.local/bin/hadolint /root/.local/bin/hadolint diff --git a/src/update-dev-tools.sh b/src/update-dev-tools.sh index a09cbe0..7642359 100755 --- a/src/update-dev-tools.sh +++ b/src/update-dev-tools.sh @@ -53,8 +53,6 @@ execute () { update_package fourmolu "$_tempdir" log "Updating cabal-fmt" update_package cabal-fmt "$_tempdir" - log "Updating hadolint" - update_package hadolint "$_tempdir" # We don't care about the exit code, we just want the diff output log "Running diff to check for changes" diff "${dockerfile}.bak" "$dockerfile" || true From fb6d3f191587179fc1e32b5baeb5d8b39b6b6c12 Mon Sep 17 00:00:00 2001 From: Tristan Jugdev Date: Thu, 23 Oct 2025 14:07:52 -0600 Subject: [PATCH 3/5] Update action versions --- .github/workflows/publish.yml | 6 +++--- .github/workflows/pull-request.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d6f0401..2281917 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,10 +27,10 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx- @@ -38,7 +38,7 @@ jobs: ${{ runner.os }}-buildx- - name: Build and push image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: tags: 'ghcr.io/fossas/haskell-dev-tools:9.8.4' push: true diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 96538a6..3857060 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -62,10 +62,10 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx- @@ -78,7 +78,7 @@ jobs: echo "::set-output name=shorthash::$(git rev-parse --short HEAD)" - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: context: ./src push: false From f9853728fe6122bfcb3461a37df4f3f7519fcfed Mon Sep 17 00:00:00 2001 From: Tristan Jugdev Date: Thu, 23 Oct 2025 14:17:01 -0600 Subject: [PATCH 4/5] Update hlint --- src/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dockerfile b/src/Dockerfile index cd6db9f..ce5f0f7 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -2,7 +2,7 @@ FROM fossa/haskell-static-alpine:ghc-9.8.4 AS builder-9.8 # By installing these separately, we prevent the dependecies of one package from conflicting with the others RUN cabal update && \ - cabal install --install-method=copy hlint-3.8 && \ + cabal install --install-method=copy hlint-3.10 && \ cabal install --install-method=copy fourmolu-0.19.0.1 && \ cabal install --install-method=copy cabal-fmt-0.1.12 From 1caa89338ec668e7b43fffc7b60f61a6217c1e2a Mon Sep 17 00:00:00 2001 From: Tristan Jugdev Date: Thu, 23 Oct 2025 15:25:04 -0600 Subject: [PATCH 5/5] Mention multi-platform in changelog --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4fb3562..077ea94 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ fossas/fossa-cli repo. - GHC is now version 9.8.4 - cabal-install is now 3.12.1.0 +- Multi-platform support: Build images for `linux/amd64` and `linux/arm64` ### GHC 9.8.2