feat: bun workspace setup
Some checks failed
Build and Push Docker Image / build (push) Failing after 17s

This commit is contained in:
Lars Hampe 2024-09-28 13:33:44 +02:00
parent 1dc2cddcb2
commit 46b49abd17
8 changed files with 129 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
npm-debug.log

View File

@ -0,0 +1,36 @@
name: Build and Push Docker Image
run-name: ${{ gitea.actor }}
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.29
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Set docker chmod (temp solution)
run: sudo chmod 666 /var/run/docker.sock
- name: Docker - Login
uses: docker/login-action@v1
with:
registry: git.hashdot.co
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

29
.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Dependencies
node_modules
# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# Testing
coverage
# Build Outputs
out/
build
dist
# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Misc
.DS_Store
*.pem

0
apps/.gitkeep Normal file
View File

37
biome.json Normal file
View File

@ -0,0 +1,37 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto",
"ignore": ["**/build", "**/coverage", "**/*.json"]
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": { "noConsoleLog": "warn" },
"correctness": { "noChildrenProp": "off" }
},
"ignore": ["**/*.json", "**/*.gen.ts"]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto"
}
},
"overrides": [{ "include": ["*.astro"] }]
}

6
lefthook.yaml Normal file
View File

@ -0,0 +1,6 @@
pre-commit:
commands:
check:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
stage_fixed: true

20
package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "boring.tools",
"scripts": {
"lint:apps": "bunx biome lint --write ./apps",
"lint:packages": "bunx biome lint --write ./packages",
"check:apps": "bunx biome check --write --config-path ./biome.json ./apps",
"check:packages": "bunx biome check --write --config-path ./biome.json ./packages",
"dev": "bun --filter '*' dev",
"build": "bun --filter '*' build"
},
"packageManager": "bun@1.1.29",
"workspaces": [
"apps/*",
"packages/*"
],
"devDependencies": {
"@biomejs/biome": "1.8.3",
"lefthook": "^1.7.15"
}
}

0
packages/.gitkeep Normal file
View File