Skip to content

[cicd] publish nightly #2550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cli-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,38 @@ jobs:
- name: Build devbox
run: go build -o dist/devbox ./cmd/devbox
- name: Upload devbox artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: devbox-${{ runner.os }}-${{ runner.arch }}
path: ./dist/devbox
retention-days: 7
- name: Publish to Cloudflare DNS
# comment out for testing
if: github.event_name == 'schedule' && matrix.os == 'ubuntu-latest' # Only run on nightly builds for Ubuntu
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_DEV_JETIFY_COM_ZONE_ID: ${{ secrets.CLOUDFLARE_DEV_JETIFY_COM_ZONE_ID }}
run: |
ARTIFACT_URL="github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload-artifact.outputs.artifact-id }}"
curl --request PATCH \
"https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_DEV_JETIFY_COM_ZONE_ID/rulesets/8e90f56d9df8499ebf5023d188d62d99/rules/fab5cd9a2e574e0aa6ab73d622d6a350" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"expression": "(http.host eq \"nightly-ubuntu.dev-jetify.com\")",
"description": "Redirect nightly build requests to GitHub artifacts",
"action": "redirect",
"action_parameters": {
"from_value": {
"target_url": {
"value": "https://'$ARTIFACT_URL'"
},
"status_code": 302,
"preserve_query_string": false
}
}
}'

typos:
name: Spell Check with Typos
Expand Down
Loading