Add .tool-versions file and bump go to 1.21 #224
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CoreDNS | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
branches: [ 'main' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Init | |
run: go mod tidy | |
- name: Build CoreDNS | |
run: | | |
git clone https://github.com/coredns/coredns | |
pushd coredns | |
mkdir -p plugin/dnsimple | |
cp ../*.go plugin/dnsimple | |
cp ../go.mod plugin/dnsimple | |
sed -i "/^go ${{env.GO_VERSION}}/a replace github.com/dnsimple/coredns-dnsimple => ./plugin/dnsimple" go.mod | |
sed -i '/route53:route53/i dnsimple:github.com\/dnsimple\/coredns-dnsimple' plugin.cfg | |
GOFLAGS=-mod=mod go generate | |
go mod tidy | |
go build |