-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.69 KB
/
Copy pathpreview-dev.yml
File metadata and controls
61 lines (59 loc) · 1.69 KB
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
name: Preview Dev
on:
workflow_dispatch:
inputs:
ref:
type: string
default: 'feature/infra'
required: false
description: 'The CasualOS repo ref that should be deployed.'
jobs:
preview:
name: Preview
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
repository: "casual-simulation/casualos"
ref: ${{ inputs.ref }}
path: casualos
fetch-depth: 250
fetch-tags: true
- uses: actions/checkout@v4
with:
path: infra
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: build casualos
working-directory: casualos
run: |
corepack enable
npm run bootstrap
npm run build
env:
CI: true
SERVER_CONFIG_FILE: '${{ github.workspace }}/infra/build-config/server-config.dev.json'
- uses: pulumi/actions@v5
- name: preview infrastructure
working-directory: infra
run: |
pnpm install
pwd
pulumi login file://.
pulumi stack select dev
pulumi --verbose=9 --logtostderr --logflow preview > ./preview.simple.diff
# pulumi preview --diff > ./preview.diff
env:
PULUMI_CONFIG_PASSPHRASE_FILE: '${{ github.workspace }}/infra/.secrets/dev.txt'
- uses: actions/upload-artifact@v4
with:
name: preview-changes
path: |
infra/preview.simple.diff
infra/preview.diff