diff --git a/.woodpecker/dns.yml b/.woodpecker/dns.yml new file mode 100644 index 0000000..f5561f0 --- /dev/null +++ b/.woodpecker/dns.yml @@ -0,0 +1,33 @@ +pipeline: + validate: + image: alpine + when: + path: "dns/**" + event: pull_request + secrets: + - linode_token + commands: + - apk add --no-cache terraform + - terraform version + - | + cd dns + echo 'token = "$${LINODE_TOKEN}"' > .auto.tfvars + terraform validate + terraform plan + + deploy: + image: alpine + when: + path: "dns/**" + event: push + secrets: + - linode_token + commands: + - apk add --no-cache terraform + - terraform version + - | + cd dns + echo 'token = "$${LINODE_TOKEN}"' > .auto.tfvars + terraform validate + terraform plan -out deploy.plan + terraform apply deploy.plan