mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
Merge branch 'master' into ft/add-codeql
This commit is contained in:
commit
765fbd274f
21
.github/actions/init/action.yaml
vendored
Normal file
21
.github/actions/init/action.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
name: Init
|
||||
description: Init
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Init Thrift
|
||||
uses: valitydev/action-setup-thrift@v0.0.1
|
||||
|
||||
- name: Init NodeJS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16.4.2'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Packages
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
- name: Compile Thrift
|
||||
run: npm run compile
|
||||
shell: bash
|
53
.github/workflows/build-push.yaml
vendored
53
.github/workflows/build-push.yaml
vendored
@ -1,32 +1,31 @@
|
||||
name: Build
|
||||
name: Build & Push
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: ["*"]
|
||||
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'main'
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Init Thrift
|
||||
uses: valitydev/action-setup-thrift@v0.0.1
|
||||
- name: Init
|
||||
uses: ./.github/actions/init
|
||||
|
||||
- name: Init NodeJS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16.4.2'
|
||||
cache: 'npm'
|
||||
- name: Check & Build
|
||||
run: npm run ci:build
|
||||
|
||||
- name: Install Packages
|
||||
run: npm ci
|
||||
|
||||
- name: Compile Thrift
|
||||
run: npm run compile
|
||||
|
||||
- name: Check & Build
|
||||
run: npm run ci:build
|
||||
- name: Deploy image
|
||||
uses: valitydev/action-deploy-docker@v1.0.16
|
||||
with:
|
||||
registry-username: ${{ github.actor }}
|
||||
registry-access-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
dockerfile-path: .
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
|
20
.github/workflows/pr-build-check.yaml
vendored
Normal file
20
.github/workflows/pr-build-check.yaml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: 'PR: Build & Check'
|
||||
on:
|
||||
pull_request:
|
||||
branches: ['*']
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Init
|
||||
uses: ./.github/actions/init
|
||||
|
||||
- name: Check & Build
|
||||
run: npm run ci:build
|
19
.github/workflows/pr.yaml
vendored
19
.github/workflows/pr.yaml
vendored
@ -1,13 +1,12 @@
|
||||
name: 'PR Title Checker'
|
||||
on:
|
||||
pull_request:
|
||||
types: [edited, opened, synchronize, reopened]
|
||||
branches: [disabled]
|
||||
|
||||
pull_request:
|
||||
types: [edited, opened, synchronize, reopened]
|
||||
branches: [disabled]
|
||||
jobs:
|
||||
title-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: naveenk1223/action-pr-title@master
|
||||
with:
|
||||
regex: '([A-Z]+-[0-9]+,?)+: [A-Z0-9].*'
|
||||
title-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: naveenk1223/action-pr-title@master
|
||||
with:
|
||||
regex: '([A-Z]+-[0-9]+,?)+: [A-Z0-9].*'
|
||||
|
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM nginx:1.21
|
||||
COPY dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/vhosts.d/control-center.conf
|
@ -13,7 +13,7 @@
|
||||
"lint": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 2070 --cache",
|
||||
"lint-errors": "npm run lint -- --quiet --format codeframe",
|
||||
"lint-fix": "npm run lint -- --fix",
|
||||
"prettier-preset": "prettier \"**/*.{html,js,ts,css,scss,md,json,prettierrc,svg,huskyrc}\"",
|
||||
"prettier-preset": "prettier \"**/*.{html,js,ts,css,scss,md,json,prettierrc,svg,huskyrc,yml,yaml}\"",
|
||||
"prettier": "npm run prettier-preset -- --list-different",
|
||||
"prettier:fix": "npm run prettier-preset -- --write",
|
||||
"fix": "npm run lint-fix; npm run prettier:fix",
|
||||
|
@ -1,18 +1,11 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"*"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch"
|
||||
],
|
||||
"groupName": "all non-major dependencies",
|
||||
"groupSlug": "all-minor-patch"
|
||||
}
|
||||
]
|
||||
"extends": ["config:base"],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePatterns": ["*"],
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"groupName": "all non-major dependencies",
|
||||
"groupSlug": "all-minor-patch"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user