mirror of
https://github.com/koenrh/dnscontrol-action.git
synced 2025-01-10 09:09:21 +08:00
Merge pull request #6 from koenrh/koenrh/add-examples
Add example workflow
This commit is contained in:
commit
6e93a1ca95
2 changed files with 37 additions and 0 deletions
8
examples/README.md
Normal file
8
examples/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Examples
|
||||
|
||||
Find in [main.workflow](main.workflow) an example workflow:
|
||||
|
||||
1. Lint the `dnsconfig.js` configuration file using ESLint.
|
||||
1. Preview the DNS changes.
|
||||
1. Check whether the current branch is `master`, otherwise abort.
|
||||
1. Deploy the DNS changes.
|
29
examples/main.workfow
Normal file
29
examples/main.workfow
Normal file
|
@ -0,0 +1,29 @@
|
|||
workflow "Deploy DNS" {
|
||||
on = "push"
|
||||
resolves = ["DNSControl push"]
|
||||
}
|
||||
|
||||
action "ESLint" {
|
||||
uses = "koenrh/actions/eslint@4bd28abf67573a1b21b0efa07d2fbbc04b32c6af"
|
||||
args = "dnsconfig.js"
|
||||
}
|
||||
|
||||
action "DNSControl preview" {
|
||||
uses = "koenrh/dnscontrol-action@ec8e8a39a250ccb4368ce9de4888db9511b61740"
|
||||
args = "preview"
|
||||
needs = ["ESLint"]
|
||||
secrets = ["CLOUDFLARE_API_USER", "CLOUDFLARE_API_KEY"]
|
||||
}
|
||||
|
||||
action "Branch filter" {
|
||||
uses = "actions/bin/filter@b2bea0749eed6beb495a8fa194c071847af60ea1"
|
||||
args = "branch master"
|
||||
needs = ["DNSControl preview"]
|
||||
}
|
||||
|
||||
action "DNSControl push" {
|
||||
uses = "koenrh/dnscontrol-action@ec8e8a39a250ccb4368ce9de4888db9511b61740"
|
||||
needs = ["Branch filter"]
|
||||
args = "push"
|
||||
secrets = ["CLOUDFLARE_API_KEY", "CLOUDFLARE_API_USER"]
|
||||
}
|
Loading…
Reference in a new issue