Skip to content

Commit 5801ca2

Browse files
committed
fix 3
1 parent 02b648d commit 5801ca2

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.github/workflows/cli-tests.yaml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,30 @@ jobs:
6969
retention-days: 7
7070
- name: Publish to Cloudflare DNS
7171
# 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
7373
env:
7474
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 }}
7676
run: |
7777
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" \
8182
--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+
}'
8896
8997
typos:
9098
name: Spell Check with Typos

0 commit comments

Comments
 (0)