Skip to content

Commit f575f4d

Browse files
authored
Merge pull request #94 from pi-hole/new/clang
Add clang into ftl-build images + code maintainance
2 parents 4ddc5b9 + 801a0b1 commit f575f4d

File tree

2 files changed

+14
-24
lines changed

2 files changed

+14
-24
lines changed

.github/workflows/ftl-build.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- 'ftl-build/**'
66
- '.github/workflows/ftl-build.yml'
77
push:
8+
branches:
9+
- '**'
810
tags:
911
- "**"
1012
paths:
@@ -28,23 +30,17 @@ jobs:
2830
matrix:
2931
include:
3032
- platform: linux/amd64
31-
container: alpine:3.18
3233
- platform: linux/386
33-
container: alpine:3.18
3434
- platform: linux/arm/v6
35-
container: alpine:3.18
3635
- platform: linux/arm/v7
37-
container: alpine:3.18
3836
- platform: linux/arm64/v8
39-
container: alpine:3.18
4037
- platform: linux/riscv64
41-
container: alpine:edge
4238
steps:
43-
- name: Prepare name for digest up/download
39+
-
40+
name: Prepare name for digest up/download
4441
run: |
4542
platform=${{ matrix.platform }}
4643
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
47-
4844
-
4945
name: Checkout Repo
5046
uses: actions/checkout@v4
@@ -90,7 +86,7 @@ jobs:
9086
tags: ${{ steps.meta.outputs.tags }}
9187
labels: ${{ steps.meta.outputs.labels }}
9288
build-args: |
93-
CONTAINER=${{ matrix.container }}
89+
CONTAINER=alpine:${{ ( github.event_name == 'scheduled' || matrix.platform == 'linux/riscv64' ) && 'edge' || 'latest' }}
9490
-
9591
name: Push builder target and push by digest
9692
if: github.event_name != 'pull_request'
@@ -102,10 +98,9 @@ jobs:
10298
push: ${{ github.event_name != 'workflow_dispatch' }}
10399
target: builder
104100
labels: ${{ steps.meta.outputs.labels }}
105-
build-args: |
106-
CONTAINER=${{ matrix.container }}
107101
outputs: |
108102
type=image,name=${{ env.DOCKER_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
103+
type=image,name=${{ env.GITHUB_REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
109104
-
110105
name: Export digests
111106
if: github.event_name != 'pull_request'
@@ -142,7 +137,6 @@ jobs:
142137
path: /tmp/digests
143138
pattern: digests-*
144139
merge-multiple: true
145-
146140
-
147141
name: Set up Docker Buildx
148142
uses: docker/setup-buildx-action@v3
@@ -154,7 +148,6 @@ jobs:
154148
docker_password: ${{ secrets.DOCKERHUB_PASS }}
155149
ghcr_username: ${{ github.repository_owner }}
156150
ghcr_password: ${{ secrets.GITHUB_TOKEN }}
157-
158151
-
159152
name: Docker meta
160153
id: meta_docker
@@ -188,4 +181,3 @@ jobs:
188181
run: |
189182
docker buildx imagetools inspect ${{ env.DOCKER_REGISTRY_IMAGE }}:${{ steps.meta_docker.outputs.version }}
190183
docker buildx imagetools inspect ${{ env.GITHUB_REGISTRY_IMAGE }}:${{ steps.meta_docker.outputs.version }}
191-

ftl-build/Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@ RUN apk add --no-cache \
3131
libidn2-static \
3232
libunistring-dev \
3333
libunistring-static \
34-
perl
35-
36-
# Install pdns from community repo
37-
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VER}/community" >> /etc/apk/repositories; \
38-
apk update; \
39-
apk add --no-cache \
40-
pdns \
41-
pdns-backend-sqlite3 \
42-
pdns-recursor \
43-
pdns-doc
34+
perl \
35+
clang \
36+
pdns \
37+
pdns-backend-sqlite3 \
38+
pdns-recursor \
39+
pdns-doc \
40+
gdb
4441

4542
ENV STATIC true
4643
ENV TEST true
@@ -102,6 +99,7 @@ FROM builder AS tester
10299

103100
# For FTL test compilation
104101
ARG TARGETPLATFORM
102+
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
105103
ARG TARGETARCH
106104
ARG TARGETVARIANT
107105
ARG CI_ARCH="$TARGETPLATFORM"

0 commit comments

Comments
 (0)