Skip to content

Commit bf3223e

Browse files
committed
update workflow and documentation for badges
1 parent 7dfffb3 commit bf3223e

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
on:
22
workflow_dispatch:
3+
push:
4+
branches: [ website ]
35
schedule:
4-
- cron: '0 * * * *'
6+
- cron: 0 0 * * *
57

6-
name: update badges
8+
name: deploy updated script/data for badges
79
jobs:
8-
update_badges:
10+
deploy_badges:
911
runs-on: ubuntu-20.04
1012
steps:
1113
- uses: actions/checkout@v2
12-
- name: update badges
14+
- name: deploy updated script/data for badges
1315
env:
1416
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
1517
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

badges/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,21 @@ NOTE: two worker scripts are created (`user-badge`) and (`org-badge`) with diffe
2222
4. Configure each of the worker scripts [as described here](https://developers.cloudflare.com/workers/platform/routes#custom-routes):
2323
* Create an AAAA record for `100::` which is proxied by CloudFlare (orange-cloud)
2424
* Ensure that a route is added which maps to the worker, as no routes are added by default
25+
26+
NOTE: I use [DNSControl](https://stackexchange.github.io/dnscontrol/) for managing DNS, and this is the configuration I use:
27+
28+
```js
29+
var REGISTRAR = NewRegistrar('none', 'NONE');
30+
var CLOUDFLARE = NewDnsProvider('cloudflare', 'CLOUDFLAREAPI', { manage_workers: true });
31+
32+
D('committers.top', REGISTRAR, DnsProvider(CLOUDFLARE),
33+
ALIAS('@', 'ashkulz.github.io.'),
34+
CNAME('www', 'ashkulz.github.io.'),
35+
AAAA ('user-badge', '100::', CF_PROXY_ON),
36+
AAAA ('org-badge', '100::', CF_PROXY_ON),
37+
38+
CF_WORKER_ROUTE("user-badge.committers.top/*", "user-badge"),
39+
CF_WORKER_ROUTE("org-badge.committers.top/*", "org-badge")
40+
)
41+
42+
```

0 commit comments

Comments
 (0)