Skip to content

Docker

Docker #2

Workflow file for this run

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
release:
types: [published]
workflow_dispatch:
inputs:
release:
description: "Release (e.g., v1.9.0)"
required: true
jobs:
docker-release:
runs-on: ubuntu-latest
env:
RELEASE: ${{ github.event.inputs.release || github.event.release.tag_name }}
IMAGE_PREFIX: ${{ github.repository }}
COREDNS_VERSION: 1.11.1
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout coredns
uses: actions/checkout@v4
with:
repository: coredns/coredns
ref: v${{ env.COREDNS_VERSION }}
- name: Build Docker Images
run: |
sed -i 's/github.com\/coredns\/coredns\/releases\/download/github.com\/delta10\/k8s_cache\/releases\/download/' Makefile.docker
make VERSION=${RELEASE:1} DOCKER=delta10 LINUX_ARCH="amd64 arm64" -f Makefile.docker release
- name: Show Docker Images
run: docker images
- name: Publish Docker Images
run: |
set -x -e
for arch in "amd64 arm64"; do \
docker tag delta10/coredns:$arch-${RELEASE:1} ghcr.io/delta10/coredns:$arch-${RELEASE:1}
docker push ghcr.io/delta10/coredns:$arch-${RELEASE:1}
done