-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2b1cef
commit 089a57a
Showing
8 changed files
with
3,480 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'master' | ||
- 'staging' | ||
- 'release/**' | ||
tags-ignore: | ||
- '**' | ||
pull_request: | ||
branches-ignore: | ||
- 'master' | ||
- 'staging' | ||
- 'release/**' | ||
tags-ignore: | ||
- '**' | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
node-version: [18.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Fix node-gyp (Windows Only) | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
npm install -g node-gyp | ||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
- name: npm install and test | ||
run: | | ||
corepack enable | ||
npm run bootstrap | ||
npx --node-options="--max_old_space_size=4096" jest --detectOpenHandles --forceExit --no-cache | ||
env: | ||
CI: true | ||
build: | ||
name: Build AUX | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
node-version: [18.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Fix node-gyp (Windows Only) | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
npm install -g node-gyp | ||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
- name: npm install and build | ||
run: | | ||
corepack enable | ||
npm run bootstrap | ||
npm run build | ||
env: | ||
CI: true | ||
docs: | ||
name: Build Docs | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
node-version: [18.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Fix node-gyp (Windows Only) | ||
if: matrix.os == 'windows-latest' | ||
shell: pwsh | ||
run: | | ||
npm install -g node-gyp | ||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
- name: npm install | ||
run: | | ||
corepack enable | ||
npm run bootstrap | ||
env: | ||
CI: true | ||
- name: build docs | ||
run: | | ||
cd docs | ||
npm run build | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Preview | ||
|
||
on: | ||
pull_request: | ||
tags-ignore: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
preview: | ||
name: Preview | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [18.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
repository: 'casual-simulation/casualos' | ||
ref: 'master' | ||
path: casualos | ||
fetch-depth: 20 | ||
- uses: actions/checkout@v4 | ||
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 | ||
- uses: pulumi/actions@v5 | ||
- name: preview infrastructure | ||
working-directory: infra | ||
run: | | ||
pnpm install | ||
pulumi login file://./.pulumi | ||
pulumi preview --diff > ./previews/preview.diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
encryptionsalt: v1:QFUBps5oMC0=:v1:ujK1dCvyihPPrZ7g:rVcaIpOxtv3+dV1x6Vro3bz2k2a0rA== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: .pulumi | ||
runtime: | ||
name: nodejs | ||
options: | ||
packagemanager: pnpm | ||
description: A minimal TypeScript Pulumi program | ||
config: | ||
pulumi:tags: | ||
value: | ||
pulumi:template: typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { aws } from '@casual-simulation/infra'; | ||
import * as pulumi from '@pulumi/pulumi'; | ||
|
||
let config = new pulumi.Config(); | ||
|
||
const allowedOrigins = config.require('allowedOrigins'); | ||
const allowedApiOrigins = config.require('allowedApiOrigins'); | ||
const filesStorageClass = config.get('filesStorageClass'); | ||
const moderationJobSchedule = config.get('moderationJobSchedule'); | ||
const moderationJobPriority = config.get('moderationJobPriority'); | ||
const moderationJobProjectVersion = config.get('moderationJobProjectVersion'); | ||
const sesIdentityName = config.get('sesIdentityName'); | ||
|
||
new aws.serverless.CasualOSComponent('casualos', { | ||
allowedOrigins: allowedOrigins, | ||
allowedApiOrigins: allowedApiOrigins, | ||
filesStorageClass: filesStorageClass, | ||
sesIdentityName: sesIdentityName, | ||
moderationJobPriority: moderationJobPriority, | ||
moderationJobProjectVersion: moderationJobProjectVersion, | ||
moderationJobScheduleExpression: moderationJobSchedule, | ||
archive: new pulumi.asset.FileArchive('../casualos/src/aux-server/aux-backend/serverless/aws/dist/handlers'), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "infra-template", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "Casual Simulation", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@casual-simulation/infra": "3.3.8-alpha.0", | ||
"@pulumi/aws": "^6.0.0", | ||
"@pulumi/aws-apigateway": "^2.0.0", | ||
"@pulumi/awsx": "^2.0.2", | ||
"@pulumi/pulumi": "^3.113.0", | ||
"@pulumi/aws-native": "^0.116.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18", | ||
"typescript": "^5.0.0" | ||
} | ||
} |
Oops, something went wrong.