Skip to content
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

fix(all): worker environments #2538

Merged
merged 3 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/main-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/console'
command: publish --config wrangler.dev.toml
environment: 'dev'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/main-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,23 @@ jobs:
- name: Test
run: yarn run test

- name: Deploy edges D1 Database
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/core'
command: d1 migrations apply edges-v2-dev --config wrangler.dev.toml --env dev
environment: 'dev'

- name: Deploy
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/core
command: publish --config wrangler.dev.toml
environment: 'dev'
secrets: |
SECRET_JWK_CURRENT_KID
SECRET_JWKS
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-email.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/email
command: publish --config wrangler.dev.toml
environment: 'dev'
secrets: |
INTERNAL_DKIM_DOMAIN
INTERNAL_DKIM_SELECTOR
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-galaxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/galaxy'
command: publish --config wrangler.dev.toml
environment: 'dev'
env:
NODE_ENV: 'development'
1 change: 1 addition & 0 deletions .github/workflows/main-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/images'
command: publish --config wrangler.dev.toml
environment: 'dev'
# This causes secrets to be set as if by: $ wrangler secret put.
# Each supplied name must be defined in the env: config stanza.
secrets: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-passport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/passport'
command: publish --config wrangler.dev.toml
environment: 'dev'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/profile'
command: publish --config wrangler.dev.toml
environment: 'dev'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/next-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/console'
command: publish --config wrangler.next.toml
environment: 'next'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/next-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Core

on:
push:
branches:
- main
tags:
- '*'

defaults:
run:
Expand Down Expand Up @@ -39,13 +39,23 @@ jobs:
- name: Test
run: yarn run test

- name: Deploy edges D1 Database
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/core'
command: d1 migrations apply edges-v2-next --config wrangler.next.toml --env next
environment: 'next'

- name: Deploy
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/core
command: publish --config wrangler.next.toml
environment: 'next'
secrets: |
SECRET_JWK_CURRENT_KID
SECRET_JWKS
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/next-email.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/email
command: publish --config wrangler.next.toml
environment: 'next'
secrets: |
INTERNAL_DKIM_DOMAIN
INTERNAL_DKIM_SELECTOR
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/next-galaxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/galaxy'
command: publish --config wrangler.next.toml
environment: 'next'
1 change: 1 addition & 0 deletions .github/workflows/next-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/images'
command: publish --config wrangler.next.toml
environment: 'next'
# This causes secrets to be set as if by: $ wrangler secret put.
# Each supplied name must be defined in the env: config stanza.
secrets: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/next-passport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/passport'
command: publish --config wrangler.next.toml
environment: 'next'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/next-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/profile'
command: publish --config wrangler.next.toml
environment: 'next'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/console'
command: publish --config wrangler.current.toml
environment: 'current'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/release-core.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Core

on:
push:
branches:
- main
release:
types: [published]

defaults:
run:
Expand Down Expand Up @@ -39,13 +38,23 @@ jobs:
- name: Test
run: yarn run test

- name: Deploy edges D1 Database
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/core'
command: d1 migrations apply edges-v2-current --config wrangler.current.toml --env current
environment: 'current'

- name: Deploy
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/core
command: publish --config wrangler.current.toml
environment: 'current'
secrets: |
SECRET_JWK_CURRENT_KID
SECRET_JWKS
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-email.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/email
command: publish --config wrangler.current.toml
environment: 'current'
secrets: |
INTERNAL_DKIM_DOMAIN
INTERNAL_DKIM_SELECTOR
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-galaxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/galaxy'
command: publish --config wrangler.current.toml
environment: 'current'
1 change: 1 addition & 0 deletions .github/workflows/release-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/images'
command: publish --config wrangler.current.toml
environment: 'current'
# This causes secrets to be set as if by: $ wrangler secret put.
# Each supplied name must be defined in the env: config stanza.
secrets: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-passport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/passport'
command: publish --config wrangler.current.toml
environment: 'current'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/profile'
command: publish --config wrangler.current.toml
environment: 'current'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
Expand Down
17 changes: 9 additions & 8 deletions apps/console/wrangler.current.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name = "console-current"
name = "console"

workers_dev = false
main = "./build/index.js"
compatibility_date = "2022-04-05"
compatibility_flags = ["streams_enable_constructors"]
logpush = true

[build]
command = "yarn build"

[site]
bucket = "./public"

[env.current]
routes = [
{ pattern = "console.rollup.id", custom_domain = true, zone_name = "rollup.id" },
]
Expand All @@ -15,13 +22,7 @@ services = [
{ binding = "Images", service = "images-current" },
]

[build]
command = "yarn build"

[site]
bucket = "./public"

[vars]
[env.current.vars]
PASSPORT_URL = "https://passport.rollup.id"
COOKIE_DOMAIN = "rollup.id"
STORAGE_NAMESPACE = "console"
Expand Down
20 changes: 10 additions & 10 deletions apps/console/wrangler.dev.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name = "console-dev"

workers_dev = false
name = "console"
main = "./build/index.js"
compatibility_date = "2022-04-05"
compatibility_flags = ["streams_enable_constructors"]
logpush = true
workers_dev = false

[build]
command = "yarn build"

[site]
bucket = "./public"

[env.dev]
routes = [
{ pattern = "console-dev.rollup.id", custom_domain = true, zone_name = "rollup.id" },
]
Expand All @@ -15,13 +21,7 @@ services = [
{ binding = "Images", service = "images-dev" },
]

[build]
command = "yarn build"

[site]
bucket = "./public"

[vars]
[env.dev.vars]
PASSPORT_URL = "https://passport-dev.rollup.id"
COOKIE_DOMAIN = "rollup.id"
STORAGE_NAMESPACE = "console"
Expand Down
20 changes: 10 additions & 10 deletions apps/console/wrangler.next.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name = "console-next"

workers_next = false
name = "console"
main = "./build/index.js"
compatibility_date = "2022-04-05"
compatibility_flags = ["streams_enable_constructors"]
logpush = true
workers_dev = false

[build]
command = "yarn build"

[site]
bucket = "./public"

[env.next]
routes = [
{ pattern = "console-next.rollup.id", custom_domain = true, zone_name = "rollup.id" },
]
Expand All @@ -15,13 +21,7 @@ services = [
{ binding = "Images", service = "images-next" },
]

[build]
command = "yarn build"

[site]
bucket = "./public"

[vars]
[env.next.vars]
PASSPORT_URL = "https://passport-next.rollup.id"
COOKIE_DOMAIN = "rollup.id"
STORAGE_NAMESPACE = "console"
Expand Down
17 changes: 9 additions & 8 deletions apps/passport/wrangler.current.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name = "passport-current"
name = "passport"
main = "./build/index.js"
compatibility_date = "2022-04-05"
compatibility_flags = ["streams_enable_constructors"]
node_compat = true
workers_dev = false
logpush = true

[build]
command = "yarn build"

[site]
bucket = "./public"

[env.current]
routes = [
{ pattern = "passport.rollup.id", custom_domain = true, zone_name = "rollup.id" },
{ pattern = "passport.pz3r0.com", custom_domain = true, zone_name = "pz3r0.com" },
Expand All @@ -16,13 +23,7 @@ services = [
{ binding = "Images", service = "images-current" },
]

[build]
command = "yarn build"

[site]
bucket = "./public"

[vars]
[env.current.vars]
DEFAULT_HOSTS = ["passport.rollup.id", "passport.pz3r0.com"]
COOKIE_DOMAIN = "rollup.id"
PROFILE_APP_URL = "https://my.rollup.id"
Expand Down
Loading