refactor
This commit is contained in:
41
.github/workflows/deploy.yml
vendored
41
.github/workflows/deploy.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: Docker Image CI for GHCR
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["Run Unit-Tests"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
|
||||||
build_and_publish_backend:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build and Push Image
|
|
||||||
run: |
|
|
||||||
docker login --username wagnerbastian --password ${{ secrets.GH_PAT }} ghcr.io
|
|
||||||
docker build ./api --tag ghcr.io/wagnerbastian/keyvault_pro_api:latest
|
|
||||||
docker push ghcr.io/wagnerbastian/keyvault_pro_api:latest
|
|
||||||
build_and_publish_frontend:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Build and Push Image
|
|
||||||
run: |
|
|
||||||
docker login --username wagnerbastian --password ${{ secrets.GH_PAT }} ghcr.io
|
|
||||||
docker build ./client --tag ghcr.io/wagnerbastian/keyvault_pro_client:latest
|
|
||||||
docker push ghcr.io/wagnerbastian/keyvault_pro_client:latest
|
|
||||||
ssh-login-and-publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [build_and_publish_frontend, build_and_publish_backend]
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Setup SSH Keys and known_hosts
|
|
||||||
run: |
|
|
||||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
||||||
ssh-keyscan -H ${{ secrets.SERVER_HOST }} > ~/.ssh/known_hosts
|
|
||||||
- name: connect and pull
|
|
||||||
run: |
|
|
||||||
ssh ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "cd docker/keyvault && docker stop keyvault_client || true && docker rm keyvault_client || true && docker stop keyvault_pro_api || true && docker rm keyvault_pro_api || true && docker-compose pull && docker-compose up -d"
|
|
||||||
26
.github/workflows/test.yml
vendored
26
.github/workflows/test.yml
vendored
@@ -1,26 +0,0 @@
|
|||||||
name: Run Unit-Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["*"] # Alle Branches
|
|
||||||
tags: ["*"] # Alle Tags
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test_frontend:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Run Unit-Tests Frontend
|
|
||||||
run: |
|
|
||||||
cd client
|
|
||||||
npm install
|
|
||||||
npm run test
|
|
||||||
test_backend:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Run Unit-Tests Backend
|
|
||||||
run: |
|
|
||||||
cd api
|
|
||||||
npm install
|
|
||||||
npm run test
|
|
||||||
@@ -9,7 +9,7 @@ import { HotToastService } from '@ngxpert/hot-toast';
|
|||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
||||||
import { CreateKeyComponent } from './create/create.component';
|
import { CreateKeyComponent } from './create/create.component';
|
||||||
import { AgDeleteKeyComponent } from '../../shared/ag-grid/components/ag-delete-key/ag-delete-key.component';
|
import { AgKeyActionsComponent } from '../../shared/ag-grid/components/ag-key-actions/ag-key-actions.component';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { ArchiveComponent } from './components/archive/archive.component';
|
import { ArchiveComponent } from './components/archive/archive.component';
|
||||||
import { AgLoadingComponent } from '../../shared/ag-grid/components/ag-loading/ag-loading.component';
|
import { AgLoadingComponent } from '../../shared/ag-grid/components/ag-loading/ag-loading.component';
|
||||||
@@ -88,7 +88,8 @@ export class KeysComponent {
|
|||||||
colId: 'actions'
|
colId: 'actions'
|
||||||
, headerName: 'Aktionen'
|
, headerName: 'Aktionen'
|
||||||
, width: 140
|
, width: 140
|
||||||
, cellRenderer: AgDeleteKeyComponent
|
, cellRenderer: AgKeyActionsComponent
|
||||||
|
, sortable: false
|
||||||
// , onCellClicked: (event) => { this.deleteKey(event.data.id)}
|
// , onCellClicked: (event) => { this.deleteKey(event.data.id)}
|
||||||
,valueFormatter: (data: any) => { return data; },
|
,valueFormatter: (data: any) => { return data; },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ import { CreateKeyComponent } from '../../../../modules/keys/create/create.compo
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-ag-delete-key',
|
selector: 'app-ag-delete-key',
|
||||||
imports: [MatDialogModule, MatTooltipModule],
|
imports: [MatDialogModule, MatTooltipModule],
|
||||||
templateUrl: './ag-delete-key.component.html',
|
templateUrl: './ag-key-actions.component.html',
|
||||||
styleUrl: './ag-delete-key.component.scss'
|
styleUrl: './ag-key-actions.component.scss'
|
||||||
})
|
})
|
||||||
export class AgDeleteKeyComponent implements ICellRendererAngularComp {
|
export class AgKeyActionsComponent implements ICellRendererAngularComp {
|
||||||
key!: IKey;
|
key!: IKey;
|
||||||
params!: ICellRendererParams<any, any, any>;
|
params!: ICellRendererParams<any, any, any>;
|
||||||
|
|
||||||
Reference in New Issue
Block a user