Compare commits

..

1 Commits

Author SHA1 Message Date
90e5624576 chore: set up commitlint and git hooks
Some checks failed
Commit Message Check / conventional-commits (pull_request) Failing after 1m53s
Deploy monie-backend to dev (kaniko) / build-and-deploy (pull_request) Successful in 0s
Deploy monie-backend (kaniko) / build-and-deploy (pull_request) Successful in 0s
2026-04-04 23:00:37 +03:00
6 changed files with 21 additions and 5 deletions

View File

@@ -8,3 +8,4 @@ coverage
.env
.env.*
README.md
.codex

View File

@@ -7,7 +7,7 @@ on:
jobs:
conventional-commits:
runs-on: [self-hosted, linux, k8s]
runs-on: [self-hosted, linux]
steps:
- name: Checkout

View File

@@ -3,6 +3,7 @@ name: Deploy monie-backend to dev (kaniko)
on:
push:
branches: [ develop ]
pull_request:
jobs:
build-and-deploy:
@@ -26,7 +27,12 @@ jobs:
REPO_PATH: monie/monie-backend.git
steps:
- name: Skip deploy for pull requests
if: github.event_name == 'pull_request'
run: echo "Pull request check passed. Deploy runs only on push to develop."
- name: Debug
if: github.event_name == 'push'
run: |
set -eu
echo "sha=${{ github.sha }}"
@@ -35,6 +41,7 @@ jobs:
microk8s kubectl version --client=true
- name: Build & push with Kaniko (K8s Job)
if: github.event_name == 'push'
env:
SHA: ${{ github.sha }}
REF: ${{ github.ref_name }}
@@ -131,6 +138,7 @@ jobs:
fi
- name: Deploy to dev
if: github.event_name == 'push'
env:
SHA: ${{ github.sha }}
run: |

View File

@@ -1,9 +1,9 @@
# .gitea/workflows/deploy-prod.yml
name: Deploy monie-backend (kaniko)
on:
push:
branches: [ main ]
pull_request:
jobs:
build-and-deploy:
@@ -27,7 +27,12 @@ jobs:
REPO_PATH: monie/monie-backend.git
steps:
- name: Skip deploy for pull requests
if: github.event_name == 'pull_request'
run: echo "Pull request check passed. Deploy runs only on push to main."
- name: Build & push image with Kaniko (K8s Job)
if: github.event_name == 'push'
env:
SHA: ${{ github.sha }}
REF: ${{ github.ref_name }}
@@ -120,6 +125,7 @@ jobs:
fi
- name: Deploy to prod
if: github.event_name == 'push'
env:
SHA: ${{ github.sha }}
run: |

1
.gitignore vendored
View File

@@ -34,6 +34,7 @@ lerna-debug.log*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.codex
# dotenv environment variable files
.env

View File

@@ -1,15 +1,15 @@
FROM node:22-bookworm-slim AS deps
FROM node:24-bookworm-slim AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci
FROM node:22-bookworm-slim AS build
FROM node:24-bookworm-slim AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build && npm prune --omit=dev
FROM node:22-bookworm-slim AS runner
FROM node:24-bookworm-slim AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./