-
-
Notifications
You must be signed in to change notification settings - Fork 18
116 lines (87 loc) · 3.84 KB
/
main-core.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Core
on:
push:
branches:
- main
defaults:
run:
working-directory: platform/core
jobs:
deploy:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build ../platform.nix
- name: Cache Dependencies
id: cache-modules
uses: actions/cache@v3
with:
path: |
node_modules
.yarn
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies
run: yarn install
- name: Test
run: yarn run test
- name: Deploy edges D1 Database
uses: cloudflare/wrangler-action@2.0.0
with:
wranglerVersion: '3.2.0'
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:
wranglerVersion: '3.2.0'
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: platform/core
command: publish --config wrangler.dev.toml --env dev
environment: 'dev'
secrets: |
SECRET_JWK_CURRENT_KID
SECRET_JWKS
INTERNAL_DKIM_SELECTOR
INTERNAL_GOOGLE_OAUTH_CLIENT_ID
SECRET_GOOGLE_OAUTH_CLIENT_SECRET
INTERNAL_GITHUB_OAUTH_CLIENT_ID
SECRET_GITHUB_OAUTH_CLIENT_SECRET
INTERNAL_TWITTER_OAUTH_CLIENT_ID
SECRET_TWITTER_OAUTH_CLIENT_SECRET
INTERNAL_MICROSOFT_OAUTH_CLIENT_ID
SECRET_MICROSOFT_OAUTH_CLIENT_SECRET
INTERNAL_APPLE_OAUTH_CLIENT_ID
SECRET_APPLE_OAUTH_CLIENT_SECRET
INTERNAL_DISCORD_OAUTH_CLIENT_ID
SECRET_DISCORD_OAUTH_CLIENT_SECRET
INTERNAL_CLOUDFLARE_ZONE_ID
TOKEN_CLOUDFLARE_API
SECRET_ZERODEV_PROJECTID
env:
NODE_ENV: 'development'
SECRET_JWK_CURRENT_KID: ${{ secrets.SECRET_JWK_CURRENT_KID_DEV }}
SECRET_JWKS: ${{ secrets.SECRET_JWKS_DEV }}
INTERNAL_DKIM_SELECTOR: ${{ secrets.INTERNAL_DKIM_SELECTOR }}
INTERNAL_GOOGLE_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_GOOGLE_OAUTH_CLIENT_ID_DEV }}
SECRET_GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_GOOGLE_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_GITHUB_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_GITHUB_OAUTH_CLIENT_ID_DEV }}
SECRET_GITHUB_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_GITHUB_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_TWITTER_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_TWITTER_OAUTH_CLIENT_ID_DEV }}
SECRET_TWITTER_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_TWITTER_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_MICROSOFT_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_MICROSOFT_OAUTH_CLIENT_ID_DEV }}
SECRET_MICROSOFT_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_MICROSOFT_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_APPLE_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_APPLE_OAUTH_CLIENT_ID_DEV }}
SECRET_APPLE_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_APPLE_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_DISCORD_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_DISCORD_OAUTH_CLIENT_ID_DEV }}
SECRET_DISCORD_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_DISCORD_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_CLOUDFLARE_ZONE_ID: ${{ secrets.INTERNAL_CLOUDFLARE_ZONE_ID }}
TOKEN_CLOUDFLARE_API: ${{ secrets.TOKEN_CLOUDFLARE_API }}
SECRET_ZERODEV_PROJECTID: ${{secrets.SECRET_ZERODEV_PROJECTID_DEV }}