-
-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (50 loc) · 1.61 KB
/
main-images.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
# .github/workflows/main-images.yaml
---
name: Images
on:
push:
branches:
- main
defaults:
run:
working-directory: ./platform
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 workspaces foreach -i -v -t --include images run test
- name: Deploy Images to Dev Worker
uses: cloudflare/[email protected]
with:
wranglerVersion: '3.19.0'
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'platform/images'
command: publish --config wrangler.dev.toml --env dev
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: |
INTERNAL_CLOUDFLARE_ACCOUNT_ID
TOKEN_CLOUDFLARE_API
env:
NODE_ENV: 'development'
INTERNAL_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
TOKEN_CLOUDFLARE_API: ${{ secrets.TOKEN_CLOUDFLARE_API }}