@@ -69,22 +69,30 @@ jobs:
69
69
retention-days : 7
70
70
- name : Publish to Cloudflare DNS
71
71
# comment out for testing
72
- # if: github.event_name == 'schedule' # Only run on nightly builds
72
+ # if: github.event_name == 'schedule' && matrix.os == 'ubuntu-latest' # Only run on nightly builds for Ubuntu
73
73
env :
74
74
CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
75
- CLOUDFLARE_ZONE_ID : ${{ secrets.CLOUDFLARE_ZONE_ID }}
75
+ CLOUDFLARE_DEV_JETIFY_COM_ZONE_ID : ${{ secrets.CLOUDFLARE_DEV_JETIFY_COM_ZONE_ID }}
76
76
run : |
77
77
ARTIFACT_URL="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" \
78
+ curl --request PATCH \
79
+ "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_DEV_JETIFY_COM_ZONE_ID/rulesets/8e90f56d9df8499ebf5023d188d62d99/rules/ef569446f76946ff9ebf910320eed88c" \
80
+ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
81
+ --header "Content-Type: application/json" \
81
82
--data '{
82
- "type": "CNAME",
83
- "name": "nightly-${{ runner.os }}",
84
- "content": "'$ARTIFACT_URL'",
85
- "ttl": 1,
86
- "proxied": true
87
- }'
83
+ "expression": "(http.host eq \"nightly-ubuntu.dev-jetify.com\")",
84
+ "description": "Redirect nightly build requests to GitHub artifacts",
85
+ "action": "redirect",
86
+ "action_parameters": {
87
+ "from_value": {
88
+ "target_url": {
89
+ "value": "https://'$ARTIFACT_URL'"
90
+ },
91
+ "status_code": 302,
92
+ "preserve_query_string": false
93
+ }
94
+ }
95
+ }'
88
96
89
97
typos :
90
98
name : Spell Check with Typos
0 commit comments