Skip to content

Commit

Permalink
Enhancement: Bump coredns 1.11 variants to 1.11.3
Browse files Browse the repository at this point in the history
Signed-off-by: The Oh Brothers Bot <[email protected]>
  • Loading branch information
theohbrothersbot committed Jun 30, 2024
1 parent 67ed6d1 commit 47e3bcd
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 23 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
git diff --exit-code
build-1-11-1:
build-1-11-3:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -64,9 +64,9 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-1.11.1-${{ github.sha }}
key: ${{ runner.os }}-buildx-1.11.3-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-1.11.1-
${{ runner.os }}-buildx-1.11.3-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
Expand All @@ -79,7 +79,7 @@ jobs:

# This step generates the docker tags
- name: Prepare
id: prep-1-11-1
id: prep-1-11-3
run: |
set -e
Expand All @@ -92,7 +92,7 @@ jobs:
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="1.11.1"
VARIANT="1.11.3"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
Expand All @@ -102,45 +102,45 @@ jobs:
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 1.11.1 - Build (PRs)
- name: 1.11.3 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/1.11.1
context: variants/1.11.3
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: false
tags: |
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.11.1 - Build and push (master)
- name: 1.11.3 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/1.11.1
context: variants/1.11.3
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: 1.11.1 - Build and push (release)
- name: 1.11.3 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/1.11.1
context: variants/1.11.3
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
Expand Down Expand Up @@ -1583,7 +1583,7 @@ jobs:
update-draft-release:
needs:
- build-1-11-1
- build-1-11-3
- build-1-10-1
- build-1-9-4
- build-1-8-7
Expand All @@ -1609,7 +1609,7 @@ jobs:

publish-draft-release:
needs:
- build-1-11-1
- build-1-11-3
- build-1-10-1
- build-1-9-4
- build-1-8-7
Expand Down Expand Up @@ -1637,7 +1637,7 @@ jobs:

update-dockerhub-description:
needs:
- build-1-11-1
- build-1-11-3
- build-1-10-1
- build-1-9-4
- build-1-8-7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Whereas [official coredns docker image](https://hub.docker.com/r/coredns/coredns

| Tag | Dockerfile Build Context |
|:-------:|:---------:|
| `:1.11.1`, `:latest` | [View](variants/1.11.1) |
| `:1.11.3`, `:latest` | [View](variants/1.11.3) |
| `:1.10.1` | [View](variants/1.10.1) |
| `:1.9.4` | [View](variants/1.9.4) |
| `:1.8.7` | [View](variants/1.8.7) |
Expand Down
2 changes: 1 addition & 1 deletion generate/definitions/versions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"coredns": {
"versions": [
"1.11.1",
"1.11.3",
"1.10.1",
"1.9.4",
"1.8.7",
Expand Down
16 changes: 16 additions & 0 deletions variants/1.11.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM coredns/coredns:1.11.3 AS base
FROM alpine:3.15 AS final
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

COPY --from=base /coredns /coredns
RUN set -eux; \
/coredns --version | grep '1.11.3' -A100 -B100

RUN apk add --no-cache ca-certificates

COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
EXPOSE 53/tcp 53/udp
ENTRYPOINT [ "/docker-entrypoint.sh" ]
8 changes: 8 additions & 0 deletions variants/1.11.3/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu

if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
set -- coredns "$@"
fi

exec "$@"

0 comments on commit 47e3bcd

Please sign in to comment.