Skip to content

Commit

Permalink
Merge pull request #11 from bennetrr/v2
Browse files Browse the repository at this point in the history
V2
  • Loading branch information
Bennet Ranft authored Jan 31, 2024
2 parents 7167622 + 81b1536 commit d8b4160
Show file tree
Hide file tree
Showing 257 changed files with 16,150 additions and 3,943 deletions.
132 changes: 0 additions & 132 deletions .dockerignore

This file was deleted.

28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
################################
# EditorConfig is awesome #
# See: http://EditorConfig.org #
################################

# This file is the top-most EditorConfig file
root = true

# All files
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Define style of doc comments for indentation checks
block_comment_start = /*
block_comment = *
block_comment_end = */

# Exception for .sln files as they reformat themselves
[*.sln]
charset = utf-8-bom

[*.cs]
indent_size = 4
66 changes: 66 additions & 0 deletions .github/actions/container/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build and push container
description: Build and optionally push a container image

inputs:
registry-server:
description: Container registry server
required: false
default: docker.io
registry-user:
description: Container registry username
required: false
registry-password:
description: Container registry password
required: false
name:
description: Name of the container image
required: true
version:
description: Version of the container image (with prefix)
required: true
file:
description: Path to Dockerfile
required: false
context:
description: Working / context directory for the build process (without trailing slash)
required: false
default: .
push:
description: Whether to push the container image to the registry
required: true
default: 'false'
wemogy-npm-server:
description: wemogy npm proxy server
required: false
wemogy-npm-user:
description: wemogy npm proxy username
required: false
wemogy-npm-password:
description: wemogy npm proxy password
required: false

runs:
using: composite
steps:
- name: Setup buildx
uses: docker/setup-buildx-action@v3

- name: Login to container registery
uses: docker/login-action@v3
if: inputs.push == 'true'
with:
registry: ${{ inputs.registry-server }}
username: ${{ inputs.registry-username }}
password: ${{ inputs.registry-password }}

- name: Build ${{ inputs.push && 'and push ' }}container
uses: docker/build-push-action@v5
with:
tags: ${{ inputs.registry-server }}/${{ inputs.name }}:${{ inputs.version }}
file: ${{ inputs.file }}
context: ${{ inputs.context }}
push: ${{ inputs.push }}
build-args: |
WEMOGY_NPM_SERVER=${{ inputs.wemogy-npm-server }}
WEMOGY_NPM_USER=${{ inputs.wemogy-npm-user }}
WEMOGY_NPM_PASSWORD${{ inputs.wemogy-npm-password }}
39 changes: 39 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

jobs:
container-frontend:
name: Build frontend container
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build container
uses: ./.github/actions/container
with:
name: bennetrr/brickinv-frontend
version: 0.0.0
context: src/frontend
push: 'true'
wemogy-npm-server: ${{ secrets.WEMOGY_NPM_SERVER }}
wemogy-npm-user: ${{ secrets.WEMOGY_NPM_USER }}
wemogy-npm-password: ${{ secrets.WEMOGY_NPM_PASSWORD }}

container-backend:
name: Build backend container
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build container
uses: ./.github/actions/container
with:
name: bennetrr/brickinv-backend
version: 0.0.0
context: src/backend/Bennetr.BrickInv.Api/
push: 'true'
30 changes: 0 additions & 30 deletions .github/workflows/build-test.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/build.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Lint

on:
push:
branches:
- main
workflow_dispatch:

jobs:
editorconfig:
name: Lint with editorconfig
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run eclint
run: |
npx eclint check .
eslint:
name: Run eslint on frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2.4.0
with:
package_json_file: src/frontend/package.json


- name: Set up node
uses: actions/setup-node@v4
with:
node-version-file: src/frontend/package.json
cache: 'pnpm'

- name: Install dependencies
working-directory: src/frontend
run: |
pnpm install
- name: Run eslint
uses: sibiraj-s/action-eslint@v3
with:
working-directory: src/frontend
token: ${{ secrets.GITHUB_TOKEN }}
all-files: true
eslint-args: '--ignore-path=.gitignore --quiet --report-unused-disable-directives --max-warnings 0'
extensions: 'js,jsx,ts,tsx'
annotations: true
Loading

0 comments on commit d8b4160

Please sign in to comment.