Added builds
This commit is contained in:
parent
8f60c65771
commit
37e41d0c60
63
.gitea/build dev.yaml
Normal file
63
.gitea/build dev.yaml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
name: Build on push
|
||||||
|
run-name: Build on push
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-api:
|
||||||
|
runs-on: [runner]
|
||||||
|
container: git.sh-edraft.de/sh-edraft/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build docker
|
||||||
|
run: |
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft/open-redirect-api-dev:$(cat version.txt) .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
docker push git.sh-edraft.de/sh-edraft/open-redirect-api-dev:$(cat version.txt)
|
||||||
|
|
||||||
|
build-web:
|
||||||
|
runs-on: [runner]
|
||||||
|
container: git.sh-edraft.de/sh-edraft/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Prepare web build
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
|
||||||
|
- name: Build web
|
||||||
|
run: |
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Build docker
|
||||||
|
run: |
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft/open-redirect-web:$(cat version.txt) .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
docker push git.sh-edraft.de/sh-edraft/open-redirect-web:$(cat version.txt)
|
63
.gitea/build.yaml
Normal file
63
.gitea/build.yaml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
name: Build on push
|
||||||
|
run-name: Build on push
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-api:
|
||||||
|
runs-on: [runner]
|
||||||
|
container: git.sh-edraft.de/sh-edraft/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build docker
|
||||||
|
run: |
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft/open-redirect-api:$(cat version.txt) .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
docker push git.sh-edraft.de/sh-edraft/open-redirect-api:$(cat version.txt)
|
||||||
|
|
||||||
|
build-web:
|
||||||
|
runs-on: [runner]
|
||||||
|
container: git.sh-edraft.de/sh-edraft/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Prepare web build
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
|
||||||
|
- name: Build web
|
||||||
|
run: |
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Build docker
|
||||||
|
run: |
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft/open-redirect-web:$(cat version.txt) .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
docker push git.sh-edraft.de/sh-edraft/open-redirect-web:$(cat version.txt)
|
39
.gitea/test_before_merge.yaml
Normal file
39
.gitea/test_before_merge.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: Test before pr merge
|
||||||
|
run-name: Test before pr merge
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- edited
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
- ready_for_review
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-before-merge:
|
||||||
|
runs-on: [ runner ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: https://github.com/actions/setup-node@v3
|
||||||
|
|
||||||
|
- name: Installing dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Checking eslint
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Setup chrome
|
||||||
|
run: |
|
||||||
|
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
||||||
|
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y google-chrome-stable xvfb
|
||||||
|
|
||||||
|
- name: Testing
|
||||||
|
run: npm run test:ci
|
4
api/.gitignore
vendored
4
api/.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
src/files/
|
src/files/
|
||||||
src/logs/
|
src/logs/
|
||||||
|
|
||||||
src/.env
|
src/.env
|
||||||
|
|
||||||
|
*.pyc
|
1
version.txt
Normal file
1
version.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0.1.0
|
@ -4,14 +4,12 @@ import { NotFoundComponent } from "src/app/components/error/not-found/not-found.
|
|||||||
import { AuthGuard } from "src/app/core/guard/auth.guard";
|
import { AuthGuard } from "src/app/core/guard/auth.guard";
|
||||||
import { HomeComponent } from "src/app/components/home/home.component";
|
import { HomeComponent } from "src/app/components/home/home.component";
|
||||||
import { RedirectComponent } from "src/app/components/redirect/redirect.component";
|
import { RedirectComponent } from "src/app/components/redirect/redirect.component";
|
||||||
import { LogoutComponent } from "src/app/components/logout/logout.component";
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: HomeComponent,
|
component: HomeComponent,
|
||||||
},
|
},
|
||||||
{ path: "logout", component: LogoutComponent },
|
|
||||||
{
|
{
|
||||||
path: "admin",
|
path: "admin",
|
||||||
loadChildren: () =>
|
loadChildren: () =>
|
||||||
|
@ -23,7 +23,6 @@ import { ErrorHandlingService } from "src/app/service/error-handling.service";
|
|||||||
import { HomeComponent } from "./components/home/home.component";
|
import { HomeComponent } from "./components/home/home.component";
|
||||||
import { RedirectComponent } from "./components/redirect/redirect.component";
|
import { RedirectComponent } from "./components/redirect/redirect.component";
|
||||||
import { SettingsService } from "src/app/service/settings.service";
|
import { SettingsService } from "src/app/service/settings.service";
|
||||||
import { LogoutComponent } from './components/logout/logout.component';
|
|
||||||
|
|
||||||
if (environment.production) {
|
if (environment.production) {
|
||||||
Logger.enableProductionMode();
|
Logger.enableProductionMode();
|
||||||
@ -59,7 +58,6 @@ export function appInitializerFactory(
|
|||||||
SidebarComponent,
|
SidebarComponent,
|
||||||
HomeComponent,
|
HomeComponent,
|
||||||
RedirectComponent,
|
RedirectComponent,
|
||||||
LogoutComponent,
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
Loading…
Reference in New Issue
Block a user