Skip to content

Merge pull request #63 from glebkin/main #15

Merge pull request #63 from glebkin/main

Merge pull request #63 from glebkin/main #15

Workflow file for this run

---
name: docker-push-ghcr
on:
push:
branches: [main]
workflow_run:
types:
- completed
workflows:
- 'automerge'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.21
- name: "Build coredns binary"
run: |
go build -o coredns/coredns coredns/main.go
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v1
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: metaci
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository_owner }}/ci/coredns
tags: |
type=ref,event=pr
type=sha,prefix=
- name: "Build and push"
uses: docker/build-push-action@v2
with:
file: coredns/Dockerfile
context: .
push: true
tags: ${{ steps.metaci.outputs.tags }}