Skip to content

Commit f7e1583

Browse files
committed
[cicd] publish nightly
1 parent 643a3c4 commit f7e1583

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/cli-tests.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,24 @@ jobs:
6767
name: devbox-${{ runner.os }}-${{ runner.arch }}
6868
path: ./dist/devbox
6969
retention-days: 7
70+
- name: Publish to Cloudflare DNS
71+
# comment out for testing
72+
# if: github.event_name == 'schedule' # Only run on nightly builds
73+
env:
74+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
75+
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
76+
run: |
77+
ARTIFACT_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts"
78+
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records" \
79+
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
80+
-H "Content-Type: application/json" \
81+
--data '{
82+
"type": "CNAME",
83+
"name": "nightly-${{ runner.os }}",
84+
"content": "'$ARTIFACT_URL'",
85+
"ttl": 1,
86+
"proxied": tru
87+
}'
7088
7189
typos:
7290
name: Spell Check with Typos

0 commit comments

Comments
 (0)