Skip to content

Commit 1f27146

Browse files
committed
workflows
1 parent 3689ebb commit 1f27146

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Sync DNS
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
force:
7+
description: 'Use --force flag'
8+
required: false
9+
type: boolean
10+
default: false
511
push:
612
branches:
713
- main
@@ -18,7 +24,7 @@ jobs:
1824
- name: Install OctoDNS
1925
run: pip install 'octodns==0.9.10'
2026
- name: Sync w/ production DNS providers
21-
run: ./bin/sync
27+
run: ./bin/sync ${{ inputs.force && '--force' || '' }}
2228
env:
2329
# DNSIMPLE_ACCOUNT_NUMBER: ${{ secrets.DNSIMPLE_ACCOUNT_NUMBER }}
2430
# DNSIMPLE_API_KEY: ${{ secrets.DNSIMPLE_API_KEY }}

.github/workflows/test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Dry Run DNS
22

3-
on: ['push', 'pull_request']
3+
on:
4+
- push
5+
- pull_request
6+
- workflow_dispatch:
7+
inputs:
8+
force:
9+
description: 'Use --force flag'
10+
required: false
11+
type: boolean
12+
default: false
413

514
jobs:
615
octodns:
@@ -14,7 +23,7 @@ jobs:
1423
- name: Install OctoDNS
1524
run: pip install 'octodns==0.9.10'
1625
- name: Do a dry run
17-
run: ./bin/dry-run
26+
run: ./bin/dry-run ${{ inputs.force && '--force' || '' }}
1827
env:
1928
# DNSIMPLE_ACCOUNT_NUMBER: ${{ secrets.DNSIMPLE_ACCOUNT_NUMBER }}
2029
# DNSIMPLE_API_KEY: ${{ secrets.DNSIMPLE_API_KEY }}

bin/dry-run

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/sh
22

3-
octodns-sync --config-file=./config/main.yaml
3+
FORCE_FLAG=""
4+
if [ "$1" = "--force" ]; then
5+
FORCE_FLAG="--force"
6+
fi
7+
8+
octodns-sync --config-file=./config/main.yaml $FORCE_FLAG

bin/sync

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/sh
22

3-
octodns-sync --config-file=./config/main.yaml --doit
3+
FORCE_FLAG=""
4+
if [ "$1" = "--force" ]; then
5+
FORCE_FLAG="--force"
6+
fi
7+
8+
octodns-sync --config-file=./config/main.yaml --doit $FORCE_FLAG

0 commit comments

Comments
 (0)