Merge branch 'master' into ft/add-codeql

This commit is contained in:
Rinat Arsaev 2022-01-17 21:04:45 +03:00 committed by GitHub
commit 765fbd274f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 89 additions and 54 deletions

21
.github/actions/init/action.yaml vendored Normal file
View 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

View File

@ -1,32 +1,31 @@
name: Build name: Build & Push
on: on:
push: push:
branches: [master] branches:
pull_request: - 'master'
branches: ["*"] - 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
build: build:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Init Thrift - name: Init
uses: valitydev/action-setup-thrift@v0.0.1 uses: ./.github/actions/init
- name: Init NodeJS - name: Check & Build
uses: actions/setup-node@v2 run: npm run ci:build
with:
node-version: '16.4.2'
cache: 'npm'
- name: Install Packages - name: Deploy image
run: npm ci uses: valitydev/action-deploy-docker@v1.0.16
with:
- name: Compile Thrift registry-username: ${{ github.actor }}
run: npm run compile registry-access-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile-path: .
- name: Check & Build env:
run: npm run ci:build ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}

20
.github/workflows/pr-build-check.yaml vendored Normal file
View 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

View File

@ -1,13 +1,12 @@
name: 'PR Title Checker' name: 'PR Title Checker'
on: on:
pull_request: pull_request:
types: [edited, opened, synchronize, reopened] types: [edited, opened, synchronize, reopened]
branches: [disabled] branches: [disabled]
jobs: jobs:
title-check: title-check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: naveenk1223/action-pr-title@master - uses: naveenk1223/action-pr-title@master
with: with:
regex: '([A-Z]+-[0-9]+,?)+: [A-Z0-9].*' regex: '([A-Z]+-[0-9]+,?)+: [A-Z0-9].*'

3
Dockerfile Normal file
View 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

View File

@ -13,7 +13,7 @@
"lint": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 2070 --cache", "lint": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 2070 --cache",
"lint-errors": "npm run lint -- --quiet --format codeframe", "lint-errors": "npm run lint -- --quiet --format codeframe",
"lint-fix": "npm run lint -- --fix", "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": "npm run prettier-preset -- --list-different",
"prettier:fix": "npm run prettier-preset -- --write", "prettier:fix": "npm run prettier-preset -- --write",
"fix": "npm run lint-fix; npm run prettier:fix", "fix": "npm run lint-fix; npm run prettier:fix",

View File

@ -1,18 +1,11 @@
{ {
"extends": [ "extends": ["config:base"],
"config:base" "packageRules": [
], {
"packageRules": [ "matchPackagePatterns": ["*"],
{ "matchUpdateTypes": ["minor", "patch"],
"matchPackagePatterns": [ "groupName": "all non-major dependencies",
"*" "groupSlug": "all-minor-patch"
], }
"matchUpdateTypes": [ ]
"minor",
"patch"
],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch"
}
]
} }