mirror of
https://github.com/tiennm99/open-domains.git
synced 2026-10-15 16:15:14 +00:00
feat: new deploy workflow + rename to publish
This commit is contained in:
1 parent
d92a17a774
commit
73e3a4bd9d
2 files changed
+31
-30
No files matched your search
@@ -1,30 +0,0 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches: [main]
|
||||
paths: [domains/**, .github/workflows/deploy.yml]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-deploy
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: DNS
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: gacts/install-dnscontrol@v1
|
||||
with:
|
||||
version: 3.31.4
|
||||
|
||||
- name: Create credentials file
|
||||
run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","accountid":"$CF_ID","apitoken":"$CF_TOKEN"}}' > ./creds.json
|
||||
|
||||
- run: dnscontrol push
|
||||
env:
|
||||
CF_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
CF_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "domains/**"
|
||||
- ".github/workflows/deploy.yml"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-publish
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
dns:
|
||||
name: DNS
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json
|
||||
|
||||
- name: Publish
|
||||
uses: koenrh/dnscontrol-action@v3
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||
with:
|
||||
args: push
|
||||
config_file: "dnsconfig.js"
|
||||
Reference in new issue
Block a user