Skip to content

Commit c554560

Browse files
authored
Update to GHC 9.8.4 (#58)
* Update fourmolu * Multi-platform build and use GHC 9.8.4 * Update action versions * Update hlint * Mention multi-platform in changelog
1 parent f5d2255 commit c554560

File tree

5 files changed

+31
-26
lines changed

5 files changed

+31
-26
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,29 @@ jobs:
2323
username: fossabot
2424
password: ${{ github.token }}
2525

26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
2629
- name: Set up Docker Buildx
27-
uses: docker/setup-buildx-action@v1
30+
uses: docker/setup-buildx-action@v3
2831

2932
- name: Cache Docker layers
30-
uses: actions/cache@v2
33+
uses: actions/cache@v4
3134
with:
3235
path: /tmp/.buildx-cache
3336
key: ${{ runner.os }}-buildx-
3437
restore-keys: |
3538
${{ runner.os }}-buildx-
3639
3740
- name: Build and push image
38-
uses: docker/build-push-action@v2
41+
uses: docker/build-push-action@v6
3942
with:
40-
tags: 'ghcr.io/fossas/haskell-dev-tools:9.8.2'
43+
tags: 'ghcr.io/fossas/haskell-dev-tools:9.8.4'
4144
push: true
4245
context: ./src
4346
cache-from: type=local,src=/tmp/.buildx-cache
4447
cache-to: type=local,dest=/tmp/.buildx-cache-new
48+
platforms: linux/amd64,linux/arm64
4549

4650
- # Temp fix
4751
# https://github.com/docker/build-push-action/issues/252

.github/workflows/pull-request.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
permissions:
1414
contents: read
15-
15+
1616
steps:
1717
- uses: actions/checkout@v2
1818

@@ -36,12 +36,12 @@ jobs:
3636

3737
- name: run shellcheck
3838
run: shellcheck **/*.*sh
39-
39+
4040
docker-lint:
4141
runs-on: ubuntu-latest
4242
permissions:
4343
contents: read
44-
44+
4545
steps:
4646
- uses: actions/checkout@v2
4747

@@ -53,16 +53,19 @@ jobs:
5353
runs-on: ubuntu-latest
5454
permissions:
5555
contents: read
56-
56+
5757
steps:
5858
- name: Checkout
5959
uses: actions/checkout@v2
6060

61+
- name: Set up QEMU
62+
uses: docker/setup-qemu-action@v3
63+
6164
- name: Set up Docker Buildx
62-
uses: docker/setup-buildx-action@v1
65+
uses: docker/setup-buildx-action@v3
6366

6467
- name: Cache Docker layers
65-
uses: actions/cache@v2
68+
uses: actions/cache@v4
6669
with:
6770
path: /tmp/.buildx-cache
6871
key: ${{ runner.os }}-buildx-
@@ -72,21 +75,22 @@ jobs:
7275
- name: Get git short hash
7376
id: shorthash
7477
run: |
75-
echo "::set-output name=shorthash::$(git rev-parse --short HEAD)"
78+
echo "::set-output name=shorthash::$(git rev-parse --short HEAD)"
7679
7780
- name: Build and push
78-
uses: docker/build-push-action@v2
81+
uses: docker/build-push-action@v6
7982
with:
8083
context: ./src
8184
push: false
8285
tags: ${{ format('haskell-dev-tools-test:{0}', steps.shorthash.outputs.shorthash) }}
8386
cache-from: type=local,src=/tmp/.buildx-cache
8487
cache-to: type=local,dest=/tmp/.buildx-cache-new
88+
platforms: linux/amd64,linux/arm64
8589

8690
- # Temp fix
8791
# https://github.com/docker/build-push-action/issues/252
8892
# https://github.com/moby/buildkit/issues/1896
8993
name: Move cache
9094
run: |
9195
rm -rf /tmp/.buildx-cache
92-
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
96+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ fossas/fossa-cli repo.
3737

3838
## Changelog
3939

40+
### GHC 9.8.4
41+
42+
- GHC is now version 9.8.4
43+
- cabal-install is now 3.12.1.0
44+
- Multi-platform support: Build images for `linux/amd64` and `linux/arm64`
45+
4046
### GHC 9.8.2
4147

4248
- GHC is now version 9.8.2

src/Dockerfile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
# Build all tools except hadolint.
2-
FROM fossa/haskell-static-alpine:ghc-9.8.2 AS builder-9.8
1+
FROM fossa/haskell-static-alpine:ghc-9.8.4 AS builder-9.8
32

43
# By installing these separately, we prevent the dependecies of one package from conflicting with the others
54
RUN cabal update && \
6-
cabal install --install-method=copy hlint-3.8 && \
7-
cabal install --install-method=copy fourmolu-0.16.2.0 && \
5+
cabal install --install-method=copy hlint-3.10 && \
6+
cabal install --install-method=copy fourmolu-0.19.0.1 && \
87
cabal install --install-method=copy cabal-fmt-0.1.12
98

10-
FROM fossa/haskell-static-alpine:ghc-9.0.2 AS builder-9.0
11-
12-
RUN cabal update && \
13-
cabal install --install-method=copy hadolint-2.12.0
14-
159
# Copy the built binaries into a smaller image.
16-
FROM fossa/haskell-static-alpine:ghc-9.8.2 AS final
10+
FROM fossa/haskell-static-alpine:ghc-9.8.4 AS final
1711

1812
LABEL org.opencontainers.image.source = "https://github.com/fossas/haskell-dev-tools"
1913

2014
COPY --from=builder-9.8 /root/.local/bin/hlint /root/.cabal/bin/hlint
2115
COPY --from=builder-9.8 /root/.local/bin/fourmolu /root/.cabal/bin/fourmolu
2216
COPY --from=builder-9.8 /root/.local/bin/cabal-fmt /root/.cabal/bin/cabal-fmt
23-
COPY --from=builder-9.0 /root/.local/bin/hadolint /root/.local/bin/hadolint

src/update-dev-tools.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ execute () {
5353
update_package fourmolu "$_tempdir"
5454
log "Updating cabal-fmt"
5555
update_package cabal-fmt "$_tempdir"
56-
log "Updating hadolint"
57-
update_package hadolint "$_tempdir"
5856
# We don't care about the exit code, we just want the diff output
5957
log "Running diff to check for changes"
6058
diff "${dockerfile}.bak" "$dockerfile" || true

0 commit comments

Comments
 (0)