Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,18 @@ jobs:

- name: publish-latest
run: |
# Dockerhub
docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:latest
docker push contentful/coredns-nodecache:latest
# GHCR
docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:latest
docker push ghcr.io/contentful-labs/coredns-nodecache:latest
if: github.ref == 'refs/heads/master'

- name: publish-branch
run: |
# Dockerhub
docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:${GITHUB_REF##*/}
docker push contentful/coredns-nodecache:${GITHUB_REF##*/}
# GHCR
docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
docker push ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/master'

- name: publish-tag
run: |
# Dockerhub
docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:${GITHUB_REF##*/}
docker push contentful/coredns-nodecache:${GITHUB_REF##*/}
# GHCR
docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
docker push ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/}
if: startsWith(github.ref, 'refs/tags/v')
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.18-buster AS builder
FROM golang:1.20-buster AS builder

RUN apt update && apt upgrade -y && apt install iptables -y

RUN git clone --single-branch --branch v1.9.3 https://github.com/coredns/coredns.git /coredns
RUN git clone --single-branch --branch v1.10.1 https://github.com/coredns/coredns.git /coredns

WORKDIR /coredns

Expand All @@ -16,7 +16,7 @@ COPY *.go /coredns/plugin/nodecache/
RUN make
RUN chmod 0755 /coredns/coredns

FROM alpine:3.15
FROM alpine:3.17
RUN apk add iptables

COPY --from=builder /coredns/coredns /
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ run: build

test:
docker run -t -v $$PWD:/go/src/github.com/contentful-labs/coredns-nodecache \
-w /go/src/github.com/contentful-labs/coredns-nodecache/ golang:1.18-buster go test -v -mod=vendor ./...
-w /go/src/github.com/contentful-labs/coredns-nodecache/ golang:1.20-buster go test -v -mod=vendor ./...

lint:
docker run -t -v $$PWD:/go/src/github.com/contentful-labs/coredns-nodecache \
Expand Down