Skip to content

Commit 9523632

Browse files
committed
CI: DEFAULT_DNS_ZONE doesn't need to be secret
1 parent a6f3177 commit 9523632

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
;; Zone file for staging.testrun.org
2+
3+
$ORIGIN staging.testrun.org.
4+
$TTL 300
5+
6+
@ IN SOA ns.testrun.org. root.nine.testrun.org (
7+
2023010101 ; Serial
8+
7200 ; Refresh
9+
3600 ; Retry
10+
1209600 ; Expire
11+
3600 ; Negative response caching TTL
12+
)
13+
14+
;; Nameservers.
15+
@ IN NS ns.testrun.org.
16+
17+
;; DNS records.
18+
@ IN A 37.27.37.98
19+
mta-sts.staging.testrun.org. CNAME staging.testrun.org.
20+
www.staging.testrun.org. CNAME staging.testrun.org.

.github/workflows/test-and-deploy.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ jobs:
3030
# -d '{"image":"debian-12"}' \
3131
# "https://api.hetzner.cloud/v1/servers/${{ secrets.STAGING_SERVER_ID }}/actions/rebuild"
3232

33-
- name: initenv
34-
run: scripts/initenv.sh
33+
- run: scripts/initenv.sh
3534

3635
- name: append venv/bin to PATH
3736
run: echo venv/bin >>$GITHUB_PATH
@@ -51,25 +50,23 @@ jobs:
5150
# rsync -avz acme [email protected]:/var/lib/ || true
5251
# rsync -avz dkim [email protected]:/var/lib/rspamd/ || true
5352

54-
- name: cmdeploy init staging.testrun.org
55-
run: cmdeploy init staging.testrun.org
53+
- run: cmdeploy init staging.testrun.org
5654

57-
- name: cmdeploy run
58-
run: cmdeploy run
55+
- run: cmdeploy run
5956

6057
- name: set DNS entries
6158
run: |
6259
#ssh -o StrictHostKeyChecking=accept-new -v [email protected] chown _rspamd:_rspamd -R /var/lib/rspamd/dkim
63-
echo "${{ secrets.DEFAULT_DNS_ZONE }}" > staging.testrun.org.zone
6460
cmdeploy dns --zonefile staging-generated.zone
65-
cat staging-generated.zone >> staging.testrun.org.zone
66-
scp -o StrictHostKeyChecking=accept-new staging.testrun.org.zone [email protected]:/etc/nsd/staging.testrun.org.zone
61+
cat staging-generated.zone >> .github/workflows/staging.testrun.org-default.zone
62+
cat .github/workflows/staging.testrun.org-default.zone
63+
scp -o StrictHostKeyChecking=accept-new .github/workflows/staging.testrun.org-default.zone [email protected]:/etc/nsd/staging.testrun.org.zone
6764
ssh [email protected] nsd-checkzone staging.testrun.org /etc/nsd/staging.testrun.org.zone
6865
ssh [email protected] systemctl reload nsd
6966
7067
- name: cmdeploy test
7168
run: CHATMAIL_DOMAIN2=nine.testrun.org cmdeploy test --slow
7269

73-
- name: cmdeploy dns
70+
- name: cmdeploy dns (try 3 times)
7471
run: cmdeploy dns || cmdeploy dns || cmdeploy dns
7572

0 commit comments

Comments
 (0)