GeezerVison is showing github.com — ci: deploy dev workers in anomaly-dev (#63379) · jerrylee/opencode@33123b1
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/release/cloudflare-token.sh +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,10 @@ set +x | 12 | 12 |
| 13 | 13 | url=${CLOUDFLARE_TOKEN_URL:-https://kjivkui2evldapbok5fhrrl6oy0fctkp.lambda-url.us-east-1.on.aws/} | 14 | 14 | account=${CLOUDFLARE_ACCOUNT_ID:-15d29c8639fd3733b1b5486a2acfd968} | | 15 | +if [[ $# == 1 ]]; then | | 16 | + . "$(dirname "$0")/lib.sh" | | 17 | + account=$(stage_account "$1") | | 18 | +fi | 15 | 19 |
| 16 | 20 | # One argv value, never a line in curl's config: a newline in an override must not be able to | 17 | 21 | # inject curl options or move the AWS credentials into Basic auth. | |
Collapse file Copy file name to clipboardExpand all lines: .github/release/deploy-data.sh +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 32 | 32 |
| 33 | 33 | : "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}" | 34 | 34 | # Pinned in targets/ and in the token issuer's config (anomalyco/secrets). | 35 | | -export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968 | | 35 | +CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode") | | 36 | +export CLOUDFLARE_ACCOUNT_ID | 36 | 37 |
| 37 | 38 | unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS \ | 38 | 39 | ! -path ./v0/config.json \ | |
Collapse file Copy file name to clipboardExpand all lines: .github/release/deploy-files.sh +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,8 @@ target="$release/targets/files/$mode/wrangler.json" | 24 | 24 |
| 25 | 25 | : "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}" | 26 | 26 | # Pinned in targets/ and in the token issuer's config (anomalyco/secrets). | 27 | | -export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968 | | 27 | +CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode") | | 28 | +export CLOUDFLARE_ACCOUNT_ID | 28 | 29 |
| 29 | 30 | unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS ! -path ./index.js) | 30 | 31 | [ -z "$unexpected" ] || die "Unexpected files in the files artifact: $unexpected" | |
Collapse file Copy file name to clipboardExpand all lines: .github/release/deploy-legacy.sh +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,8 @@ target="$release/targets/legacy/$mode" | 24 | 24 |
| 25 | 25 | : "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}" | 26 | 26 | # Pinned in targets/ and in the token issuer's config (anomalyco/secrets). | 27 | | -export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968 | | 27 | +CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode") | | 28 | +export CLOUDFLARE_ACCOUNT_ID | 28 | 29 |
| 29 | 30 | unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS \ | 30 | 31 | ! -path ./v0/config.json \ | |
Collapse file Copy file name to clipboardExpand all lines: .github/release/deploy-site.sh +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,8 @@ target="$release/targets/site/$mode" | 24 | 24 |
| 25 | 25 | : "${CLOUDFLARE_API_TOKEN:?Set CLOUDFLARE_API_TOKEN}" | 26 | 26 | # Pinned in targets/ and in the token issuer's config (anomalyco/secrets). | 27 | | -export CLOUDFLARE_ACCOUNT_ID=15d29c8639fd3733b1b5486a2acfd968 | | 27 | +CLOUDFLARE_ACCOUNT_ID=$(stage_account "$mode") | | 28 | +export CLOUDFLARE_ACCOUNT_ID | 28 | 29 |
| 29 | 30 | unexpected=$(cd "$src" && find . ! -type d ! -type f -o -type f ! -path ./SHA256SUMS \ | 30 | 31 | ! -path ./v0/config.json \ | |
Collapse file Copy file name to clipboardExpand all lines: .github/release/lib.sh +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,6 +23,14 @@ dry_run() { | 23 | 23 | [ "${OPENCODE_DRY_RUN:-false}" = true ] | 24 | 24 | } | 25 | 25 |
| | 26 | +stage_account() { | | 27 | + case "$1" in | | 28 | + dev) echo d8e944f537ceef3f06a5bd3aec1d7a53 ;; | | 29 | + production) echo 15d29c8639fd3733b1b5486a2acfd968 ;; | | 30 | + *) die "Unknown Cloudflare stage: $1" ;; | | 31 | + esac | | 32 | +} | | 33 | + | 26 | 34 | sha256() { | 27 | 35 | if command -v sha256sum > /dev/null; then sha256sum "$@"; else shasum -a 256 "$@"; fi | 28 | 36 | } | |
Collapse file Copy file name to clipboardExpand all lines: .github/release/targets/data/dev/default.json +19-19Lines changed: 19 additions & 19 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | "compatibilityDate": "2026-07-25", | 4 | 4 | "compatibilityFlags": ["nodejs_compat"], | 5 | 5 | "triggers": [ | 6 | | - { "type": "fetch", "pattern": "dev.opencode.ai/data*", "zone": "opencode.ai" }, | 7 | | - { "type": "fetch", "pattern": "dev.opencode.ai/en/data*", "zone": "opencode.ai" }, | 8 | | - { "type": "fetch", "pattern": "dev.opencode.ai/zh/data*", "zone": "opencode.ai" }, | 9 | | - { "type": "fetch", "pattern": "dev.opencode.ai/zht/data*", "zone": "opencode.ai" }, | 10 | | - { "type": "fetch", "pattern": "dev.opencode.ai/ko/data*", "zone": "opencode.ai" }, | 11 | | - { "type": "fetch", "pattern": "dev.opencode.ai/de/data*", "zone": "opencode.ai" }, | 12 | | - { "type": "fetch", "pattern": "dev.opencode.ai/es/data*", "zone": "opencode.ai" }, | 13 | | - { "type": "fetch", "pattern": "dev.opencode.ai/fr/data*", "zone": "opencode.ai" }, | 14 | | - { "type": "fetch", "pattern": "dev.opencode.ai/it/data*", "zone": "opencode.ai" }, | 15 | | - { "type": "fetch", "pattern": "dev.opencode.ai/da/data*", "zone": "opencode.ai" }, | 16 | | - { "type": "fetch", "pattern": "dev.opencode.ai/ja/data*", "zone": "opencode.ai" }, | 17 | | - { "type": "fetch", "pattern": "dev.opencode.ai/pl/data*", "zone": "opencode.ai" }, | 18 | | - { "type": "fetch", "pattern": "dev.opencode.ai/ru/data*", "zone": "opencode.ai" }, | 19 | | - { "type": "fetch", "pattern": "dev.opencode.ai/uk/data*", "zone": "opencode.ai" }, | 20 | | - { "type": "fetch", "pattern": "dev.opencode.ai/ar/data*", "zone": "opencode.ai" }, | 21 | | - { "type": "fetch", "pattern": "dev.opencode.ai/no/data*", "zone": "opencode.ai" }, | 22 | | - { "type": "fetch", "pattern": "dev.opencode.ai/br/data*", "zone": "opencode.ai" }, | 23 | | - { "type": "fetch", "pattern": "dev.opencode.ai/th/data*", "zone": "opencode.ai" }, | 24 | | - { "type": "fetch", "pattern": "dev.opencode.ai/tr/data*", "zone": "opencode.ai" } | | 6 | + { "type": "fetch", "pattern": "dev.opencode.ai/data*", "zone": "dev.opencode.ai" }, | | 7 | + { "type": "fetch", "pattern": "dev.opencode.ai/en/data*", "zone": "dev.opencode.ai" }, | | 8 | + { "type": "fetch", "pattern": "dev.opencode.ai/zh/data*", "zone": "dev.opencode.ai" }, | | 9 | + { "type": "fetch", "pattern": "dev.opencode.ai/zht/data*", "zone": "dev.opencode.ai" }, | | 10 | + { "type": "fetch", "pattern": "dev.opencode.ai/ko/data*", "zone": "dev.opencode.ai" }, | | 11 | + { "type": "fetch", "pattern": "dev.opencode.ai/de/data*", "zone": "dev.opencode.ai" }, | | 12 | + { "type": "fetch", "pattern": "dev.opencode.ai/es/data*", "zone": "dev.opencode.ai" }, | | 13 | + { "type": "fetch", "pattern": "dev.opencode.ai/fr/data*", "zone": "dev.opencode.ai" }, | | 14 | + { "type": "fetch", "pattern": "dev.opencode.ai/it/data*", "zone": "dev.opencode.ai" }, | | 15 | + { "type": "fetch", "pattern": "dev.opencode.ai/da/data*", "zone": "dev.opencode.ai" }, | | 16 | + { "type": "fetch", "pattern": "dev.opencode.ai/ja/data*", "zone": "dev.opencode.ai" }, | | 17 | + { "type": "fetch", "pattern": "dev.opencode.ai/pl/data*", "zone": "dev.opencode.ai" }, | | 18 | + { "type": "fetch", "pattern": "dev.opencode.ai/ru/data*", "zone": "dev.opencode.ai" }, | | 19 | + { "type": "fetch", "pattern": "dev.opencode.ai/uk/data*", "zone": "dev.opencode.ai" }, | | 20 | + { "type": "fetch", "pattern": "dev.opencode.ai/ar/data*", "zone": "dev.opencode.ai" }, | | 21 | + { "type": "fetch", "pattern": "dev.opencode.ai/no/data*", "zone": "dev.opencode.ai" }, | | 22 | + { "type": "fetch", "pattern": "dev.opencode.ai/br/data*", "zone": "dev.opencode.ai" }, | | 23 | + { "type": "fetch", "pattern": "dev.opencode.ai/th/data*", "zone": "dev.opencode.ai" }, | | 24 | + { "type": "fetch", "pattern": "dev.opencode.ai/tr/data*", "zone": "dev.opencode.ai" } | 25 | 25 | ], | 26 | 26 | "observability": { "enabled": true }, | 27 | 27 | "workersDev": false, | |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | | - "accountId": "15d29c8639fd3733b1b5486a2acfd968", | | 2 | + "accountId": "d8e944f537ceef3f06a5bd3aec1d7a53", | 3 | 3 | "buildContext": { "isPreview": false, "mode": "dev" } | 4 | 4 | } |
Collapse file Copy file name to clipboard +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "opencode-dev-files", | | 3 | + "account_id": "d8e944f537ceef3f06a5bd3aec1d7a53", | 3 | 4 | "main": "index.js", | 4 | 5 | "no_bundle": true, | 5 | 6 | "compatibility_date": "2026-08-01", | 6 | 7 | "workers_dev": false, | 7 | 8 | "preview_urls": false, | 8 | 9 | "vars": { "STAGE": "dev" }, | 9 | | - "routes": [{ "pattern": "dev.opencode.ai/files/*", "zone_name": "opencode.ai" }], | | 10 | + "routes": [{ "pattern": "dev.opencode.ai/files/*", "zone_name": "dev.opencode.ai" }], | 10 | 11 | "r2_buckets": [{ "binding": "FILES", "bucket_name": "opencode-dev-files" }] | 11 | 12 | } |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | | - "accountId": "15d29c8639fd3733b1b5486a2acfd968", | | 2 | + "accountId": "d8e944f537ceef3f06a5bd3aec1d7a53", | 3 | 3 | "buildContext": { "isPreview": false, "mode": "dev" } | 4 | 4 | } |
|