Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
36e1dc2
Fix: Log level adjustment
Its4Nik Feb 26, 2025
b1559c8
Feat: Scheduling, Plugins (wip), databse saving of container stats
Its4Nik Feb 27, 2025
e0352f9
Feat: README update, Storing host stats in db, plugin functions and more
Its4Nik Feb 28, 2025
ea8da8f
Feat: Better logging usability, TASK level logs, database time needed…
Mar 4, 2025
68ec168
Feat: Adjustable log level and minor changes
Its4Nik Mar 4, 2025
4f2be55
Feat: Package info, contributers, License and README update
Its4Nik Mar 8, 2025
d1566b1
Update README.md
Its4Nik Mar 11, 2025
0ed8ebd
Update README.md
Its4Nik Mar 11, 2025
7d6fafe
Feat: Stacks, RealyController (WIP)
Its4Nik Mar 11, 2025
d2cc501
Fix: ignore adjustments
Its4Nik Mar 11, 2025
1b6b04a
Update README.md
Its4Nik Mar 11, 2025
a07499d
Inline variable that is immediately returned (inline-immediately-retu…
Its4Nik Mar 11, 2025
26ebd1e
Avoid unneeded ternary statements (simplify-ternary)
Its4Nik Mar 11, 2025
35f70f8
Avoid unneeded ternary statements (simplify-ternary)
Its4Nik Mar 11, 2025
a827c0a
Inline variable that is immediately returned (inline-immediately-retu…
Its4Nik Mar 11, 2025
4155566
Fix: Code Quality
Its4Nik Mar 11, 2025
e5f967e
Merge branch 'rewrite-elysia' of github.com:Its4Nik/DockStatAPI into …
Its4Nik Mar 11, 2025
1ba080d
Fix: Adjust Readme
Its4Nik Mar 11, 2025
3b4696a
Fix: Adjust Rreadme (forgot how markdown works)
Its4Nik Mar 11, 2025
03c872d
Fix: Adjust Readme (this is getting sill)
Its4Nik Mar 11, 2025
745856e
Fix: Fixes #38
Its4Nik Mar 11, 2025
ba507e2
Fix: Fixes #37
Its4Nik Mar 11, 2025
cf33ba6
Fix: Fixes #34
Its4Nik Mar 12, 2025
2e1d948
Fix: Fixes #39
Its4Nik Mar 12, 2025
91393d7
Fix: Robust parsing of Docker host URL.
Its4Nik Mar 12, 2025
583f5a9
Fix: Fixes #36
Its4Nik Mar 12, 2025
92f10b2
Merge branch 'dev' into rewrite-elysia
Its4Nik Mar 12, 2025
bb9e1c1
Merge pull request #33 from Its4Nik/rewrite-elysia
Its4Nik Mar 12, 2025
bacd092
Feat: Server timing - won't do OpenTelementry - Closes: #41
Its4Nik Mar 13, 2025
d3219e5
Feat: tRPC, ReadMe and Docs Update
Its4Nik Mar 13, 2025
4f195b4
Update README.md
Its4Nik Mar 13, 2025
a374650
Feat: Dependency graph
Its4Nik Mar 13, 2025
8739491
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Mar 13, 2025
31b5e30
Fix: Typo
Its4Nik Mar 13, 2025
29af2cf
Fix: Permission
Its4Nik Mar 13, 2025
7b8c2c1
CI/CD: Update dependency graph
Its4Nik Mar 13, 2025
9139b03
Fix: Switch to dependency-cruiser
Its4Nik Mar 13, 2025
8066901
Fix: Adjust pathing
Its4Nik Mar 13, 2025
45579b0
Fix: Adjust to no config
Its4Nik Mar 13, 2025
afc46f2
Update dependency graphs
Its4Nik Mar 13, 2025
5e4a12f
Fix: Chhhhange to bun run
Its4Nik Mar 13, 2025
17feb2e
Fix: Change to bun run
Its4Nik Mar 13, 2025
bede276
Fix: Change to Bun run
Its4Nik Mar 13, 2025
af85b57
Update dependency graphs
Its4Nik Mar 13, 2025
b1ff316
Fix: Adjust Workflow to only render svg
Its4Nik Mar 13, 2025
14c4240
Update dependency graphs
Its4Nik Mar 13, 2025
5996947
Fix: Adjust CI/CD
Its4Nik Mar 13, 2025
95e1844
Update dependency graphs
Its4Nik Mar 13, 2025
47a277e
Fix: Switch to DOTT
Its4Nik Mar 13, 2025
89a6d95
Fix: I meant archi
Its4Nik Mar 13, 2025
886098c
Update dependency graphs
Its4Nik Mar 13, 2025
93ef0c9
Fix: Ortho
Its4Nik Mar 13, 2025
538d54b
Update dependency graphs
Its4Nik Mar 13, 2025
3e851c9
Fix: Add dependency-graphs to Readme
Its4Nik Mar 18, 2025
83e52e4
Feat: Authentication, closes #40 and some more adjustments
Its4Nik Mar 18, 2025
c1113fc
Update dependency graphs
Its4Nik Mar 18, 2025
df63924
Feat: Plugins with their respectful hooks implemented. Fixes #42
Its4Nik Mar 18, 2025
9885404
Update dependency graphs
Its4Nik Mar 18, 2025
16c94da
Fix: Add routes to get all correctly imported plugins
Its4Nik Mar 18, 2025
06efcc2
Update dependency graphs
Its4Nik Mar 18, 2025
a23282c
Fix: Sourcery suggesions, knip adjustments, stack controller refactor,
Its4Nik Mar 19, 2025
68a6461
Feat: Docker image workflow
Its4Nik Mar 19, 2025
c341826
Fix: Adjust Dockerfile location
Its4Nik Mar 19, 2025
1d96562
Fix: Adjust Login Code
Its4Nik Mar 19, 2025
58b0bd5
Fix: Repository name must be lowercase :sob:
Its4Nik Mar 19, 2025
d861dc6
Fix: Bun alpine image does not support arm/v7
Its4Nik Mar 19, 2025
2149866
Fix: Add permissions
Its4Nik Mar 19, 2025
5015d83
Fix: Adjustment to Dockerfile
Its4Nik Mar 19, 2025
d54b56b
Feat: Info Route
Its4Nik Mar 19, 2025
ede35ba
Feat: Add utils route(s)
Its4Nik Mar 19, 2025
b48d616
Feat: Live Log endpoint and adjustments
Its4Nik Mar 21, 2025
7445931
Update dependency graphs
Its4Nik Mar 21, 2025
81add74
Feat: Unit testing
Its4Nik Mar 21, 2025
20c29c4
Feat: Unit tests and general adjustments
Its4Nik Mar 21, 2025
2aae57c
Update dependency graphs
Its4Nik Mar 21, 2025
6131d8a
Fix: Add dependant docker socket prroxy
Its4Nik Mar 21, 2025
3f47cd7
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Mar 21, 2025
c63e0eb
Fix: Name have to be written lowercase?
Its4Nik Mar 21, 2025
d3178ae
Fixx: That name?
Its4Nik Mar 21, 2025
b79ca8e
Fix: Adjustments to checking for container start
Its4Nik Mar 21, 2025
8579a13
Fix: Docs update
Its4Nik Mar 21, 2025
4828551
Fixxx: Mismatch in error message for deleteDockerHost parameter.
Its4Nik Mar 21, 2025
9920952
Fix: Falsy check for a boolean flag may lead to false positives.
Its4Nik Mar 21, 2025
69faa81
Fix: Unreachable code in logger format function.
Its4Nik Mar 21, 2025
aaa8c73
Fix: Typo
Its4Nik Mar 21, 2025
8c9f59a
Fix: See https://github.com/Its4Nik/DockStatAPI/pull/43#pullrequestre…
Its4Nik Mar 21, 2025
9df33d1
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Mar 21, 2025
df7b2b6
Update dependency graphs
Its4Nik Mar 21, 2025
690ab3c
Fix: Knip adjustment
Its4Nik Mar 21, 2025
48964e5
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Mar 21, 2025
6118ad9
Fix: Minor code adjustments
Its4Nik Mar 26, 2025
9b9945c
Update dependency graphs
Its4Nik Mar 26, 2025
26fac15
Fix: WebSocket connection show all containers
Its4Nik Mar 27, 2025
c1f577d
Feat: More IDs and smaller changes
Its4Nik Mar 29, 2025
ac0b430
Fix: Refactor and Stacks now have IDs !
Its4Nik Mar 29, 2025
b01ef42
Feat: Better Swagger documentation and minor fix in stack logic
Its4Nik Mar 29, 2025
8ac97e7
Update dependency graphs
Its4Nik Mar 29, 2025
84125a9
Fix: Delete unused files
Its4Nik Mar 29, 2025
15d7d06
Fix: Remove unused file and update dependencies
Its4Nik Mar 29, 2025
b339fd3
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Mar 29, 2025
b2e7ebc
Fix: Remove unused files, update dependencies
Its4Nik Mar 29, 2025
1ec78f6
Fix: Removing tRPC since it is not used in DockStat
Its4Nik Mar 30, 2025
2876048
Update dependency graphs
Its4Nik Mar 30, 2025
a8506c5
Fix: Minor code adjustments
Its4Nik Mar 30, 2025
ad3509e
Update dependency graphs
Its4Nik Mar 30, 2025
b3192ec
Feat: More info in the non websocket request
Its4Nik Apr 5, 2025
5a72c1c
Feat: Stacks progress websocket route
Its4Nik Apr 15, 2025
d62c682
Update dependency graphs
Its4Nik Apr 15, 2025
cbb42fa
Fix: Formatting
Its4Nik Apr 16, 2025
a3b0699
Feat: Linter, formatting and a bunch more
Its4Nik Apr 16, 2025
2462ed9
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Apr 16, 2025
a8e3055
Update dependency graphs
Its4Nik Apr 16, 2025
82b28c8
CI/CD: Fix Lint
Its4Nik Apr 16, 2025
d9515cf
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Apr 16, 2025
10c7d5b
CI/CD: Fix permissions
Its4Nik Apr 16, 2025
2c636b0
Linting
Its4Nik Apr 16, 2025
2cd11e4
CI/CD: Fix command
Its4Nik Apr 16, 2025
bdfb200
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Apr 16, 2025
855959f
CI/CD: Fix junit reports
Its4Nik Apr 16, 2025
488e27f
CI/CD: Fix linter
Its4Nik Apr 16, 2025
2570cb8
CI/CD: Logging to debug
Its4Nik Apr 16, 2025
fe46d26
CI/CD: This seems stupid
Its4Nik Apr 16, 2025
7846fed
CI/CD: Maybe this?
Its4Nik Apr 16, 2025
e17d6b8
CI/CD: Yes? No?
Its4Nik Apr 16, 2025
69cc950
CI/CD: This might be it
Its4Nik Apr 16, 2025
18e41a2
CI/CD: Remove detailed summarrry
Its4Nik Apr 16, 2025
e9e37a1
CI/CD: Fix path
Its4Nik Apr 16, 2025
8fe2e71
CI/CD: Fix reports
Its4Nik Apr 16, 2025
7936bb2
CI/CD: Fix readd package permission
Its4Nik Apr 16, 2025
39777b5
CI//CD: Add knip report
Its4Nik Apr 16, 2025
0877286
CI/CD: Fix add include_passed
Its4Nik Apr 16, 2025
cc0bf5e
CI/CD: Change to GH output
Its4Nik Apr 16, 2025
00f2d80
CI/CD: FIx Reporting
Its4Nik Apr 17, 2025
deb505f
CI/CD: Fix pathing
Its4Nik Apr 17, 2025
5cbe174
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
718ddd4
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
252eaae
CI/CD: pipeline.yaml
Its4Nik Apr 25, 2025
5ab15c7
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
0228832
Update pipeline.yaml
Its4Nik Apr 25, 2025
8f4b05c
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
b343c3c
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
6c2b5b0
Update pipeline.yaml
Its4Nik Apr 25, 2025
2ab6005
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
3755750
CI/CD: Update pipeline.yaml
Its4Nik Apr 25, 2025
5ae009e
Create ci.yml
Its4Nik Apr 29, 2025
f90dc15
Create cd.yml
Its4Nik Apr 29, 2025
d95032f
Delete .github/workflows/pipeline.yaml
Its4Nik Apr 29, 2025
024363e
Merge pull request #46 from Its4Nik/ci/cd-rework
Its4Nik Apr 29, 2025
8a9e4f2
Update ci.yml
Its4Nik Apr 29, 2025
5934b6c
Update ci.yml
Its4Nik Apr 29, 2025
fdd6ba8
CI/CD: Fix test pipeline
Its4Nik Apr 29, 2025
dc7e7a5
CI/CD: Fix Linter
Its4Nik Apr 29, 2025
df40a84
CI/CD: Disable padding in github logs
Its4Nik Apr 29, 2025
76ad637
CI/CD: Disable padding in github logs
Its4Nik Apr 29, 2025
f2b58f2
CI/CD: Forgot to activate the socket proxy in ci
Its4Nik Apr 29, 2025
5668377
Update ci.yml
Its4Nik Apr 29, 2025
30618fb
Update ci.yml
Its4Nik Apr 29, 2025
205c1e4
chore: apply lint fixes [skip ci]
actions-user Apr 29, 2025
de68073
Feat: Update swagger api with better examples and added submodule for…
Its4Nik Apr 30, 2025
59e9ee1
Update dependency graphs
Its4Nik Apr 30, 2025
a24c66e
Chroe: Update CodeQL
Its4Nik Apr 30, 2025
5f6fcec
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik Apr 30, 2025
911cb85
CQL: Apply lint fixes [skip ci]
actions-user Apr 30, 2025
00e8253
Feat: Eden treaty
Its4Nik Apr 30, 2025
d048958
Fix: Export for ci
Its4Nik Apr 30, 2025
6418d56
CQL: Apply lint fixes [skip ci]
actions-user Apr 30, 2025
10a1921
Fix: Formatting
Its4Nik May 3, 2025
595002b
Fix: Remove index.js
Its4Nik May 3, 2025
b561168
Update dependency graphs
Its4Nik May 3, 2025
db3b6d7
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik May 5, 2025
2bfdcce
Feat: Elysia server.d.ts route
Its4Nik May 6, 2025
675c3a1
Update dependency graphs
Its4Nik May 6, 2025
ab49684
CI/CD: Always publish test report
Its4Nik May 6, 2025
64a9b9c
Feat: Bunch of changes, see future note
Its4Nik May 8, 2025
4012718
CI/CD: Unit test update *WIP*
Its4Nik May 8, 2025
110152e
CI/CD: Fix?
Its4Nik May 8, 2025
af1f3e5
CI/CD: Remove different server port in CI
Its4Nik May 8, 2025
3434980
CI/CD: This?
Its4Nik May 8, 2025
b29081b
CI/CD: istg ts works on my machine
Its4Nik May 8, 2025
805fe4e
Feat: More resillient debugging for Database initialisation
Its4Nik May 11, 2025
d022f72
Update dependency graphs
Its4Nik May 11, 2025
e8c7c2a
Feat: Better request logging (not saved in db), adjusted error respon…
Its4Nik May 14, 2025
4b52cb2
Update dependency graphs
Its4Nik May 14, 2025
b826987
CI/CD: Move lint into seperate workflow
Its4Nik May 14, 2025
7a3253d
CQL: Apply lint fixes [skip ci]
actions-user May 14, 2025
567dc2e
CI/CD: Fix readability
Its4Nik May 14, 2025
86fb895
CI/CD: Fix readability and non existent dependant test
Its4Nik May 14, 2025
0593532
Merge branch 'dev' of github.com:Its4Nik/DockStatAPI into dev
Its4Nik May 14, 2025
f722a60
CI/CD: Fix gitignore
Its4Nik May 14, 2025
1854513
Fix: Just commit the data folder or smth to fix this weird error...
Its4Nik May 14, 2025
5198159
CI/CD: Debug junit reporter
Its4Nik May 14, 2025
b0edecd
CI/CD: Maybe do not delete the files before using them...
Its4Nik May 14, 2025
935304b
CI/CD: Always publish test results
Its4Nik May 14, 2025
64c0dc8
CI/CD: New test results
Its4Nik May 14, 2025
9d73c7d
CI/CD: Fix my wrong string flavour :sob:
Its4Nik May 14, 2025
dae4d07
CI/CD: Fix wrong path in for loop
Its4Nik May 14, 2025
c8dbcbd
CI/CD: fix type
Its4Nik May 14, 2025
17b1f98
CI/CD: Add CONTRIBUTORS.md workflow
Its4Nik May 14, 2025
9a455d9
Feat: Adjust error responses
Its4Nik May 16, 2025
7bb328b
CQL: Apply lint fixes [skip ci]
actions-user May 16, 2025
2e8528a
UT: Fix wrong body selection
Its4Nik May 16, 2025
4afe4ca
UT: Fix wrong body selection
Its4Nik May 16, 2025
3a9a3dc
Feat: I don't even know what has changed, but a lot ig
Its4Nik Jun 2, 2025
ec0c79a
Fix: Linter fix
Its4Nik Jun 2, 2025
871ab4f
Feat: Stack validation
Its4Nik Jun 2, 2025
e0ed255
Chore: Refactor Stacks controller and stuff
Its4Nik Jun 6, 2025
1177e7e
Feat: Minor refactor and bug fixes
Its4Nik Jun 7, 2025
ffab878
Update dependency graphs
Its4Nik Jun 7, 2025
ef74b6a
Feat: Database stats routes and more
Its4Nik Jun 11, 2025
47900c0
⬆️ Update dependencies and ignore .gitai.json
Its4Nik Jun 13, 2025
93f3f79
CQL: Apply lint fixes [skip ci]
actions-user Jun 13, 2025
84e3f20
```
Its4Nik Jun 19, 2025
14bc524
CQL: Apply lint fixes [skip ci]
actions-user Jun 19, 2025
956f662
```
Its4Nik Jun 29, 2025
21e3a80
Refactor(handlers): Standardize formatting and imports
Its4Nik Jun 29, 2025
d3601a5
feat(config): Remove API key from config and database
Its4Nik Jun 29, 2025
dc0b939
CQL: Apply lint fixes [skip ci]
actions-user Jun 29, 2025
5703198
feat(core): Move typings to root directory
Its4Nik Jun 30, 2025
4e643d7
CQL: Apply lint fixes [skip ci]
actions-user Jun 30, 2025
10c0422
feat(handlers): Needs testing / fixing
Its4Nik Jun 30, 2025
c6931bc
CQL: Apply lint fixes [skip ci]
actions-user Jun 30, 2025
b32bf0a
chore: some minor patches
Its4Nik Jun 30, 2025
c24248b
Lint fixes
Its4Nik Jun 30, 2025
997d6da
Lint Files
Its4Nik Jun 30, 2025
fd4e219
chore: type fixes
Its4Nik Jun 30, 2025
4ec3483
Update dependency graphs
Its4Nik Jun 30, 2025
8ba8823
save point; plugin manager adjustments
Its4Nik Jul 2, 2025
6ef8769
Feat: Websocket server for relaying stats
Its4Nik Jul 3, 2025
082bfa8
I don't even know anymore man
Its4Nik Jul 6, 2025
84d7c76
Update dependency graphs
Its4Nik Jul 6, 2025
3c4a0c3
Minor changes
Its4Nik Jul 7, 2025
5b9f054
CQL: Apply lint fixes [skip ci]
actions-user Jul 7, 2025
0839330
feat(store): add store repos functionality
Its4Nik Jul 8, 2025
f5540c6
Merge branch 'remove-elysia-for-direct-integration' of github.com:Its…
Its4Nik Jul 8, 2025
a710987
Update dependency graphs
Its4Nik Jul 8, 2025
d3c645f
feat(database): Add theme support
Its4Nik Jul 9, 2025
4ac7e14
feat(style): Update theme colors to dark mode
Its4Nik Jul 9, 2025
503db97
feat(themes): Transform and save CSS variables for themes
Its4Nik Jul 10, 2025
93870b4
Update dependency graphs
Its4Nik Jul 10, 2025
b7eb60a
feat(styles): Add text color variables to CSS root
Its4Nik Jul 10, 2025
2f21ccd
feat(config): Enhance config handling and add package.json retrieval
Its4Nik Jul 11, 2025
5e0ede5
chore(config): Remove unused PackageJson import
Its4Nik Jul 12, 2025
fe9fd19
feat(database): Update default theme and init function
Its4Nik Jul 12, 2025
253b084
feat(scheduler): Reload schedules on config update
Its4Nik Jul 13, 2025
42a5e94
Update dependency graphs
Its4Nik Jul 13, 2025
e4d1eb3
Merge pull request #51 from Its4Nik/remove-elysia-for-direct-integration
Its4Nik Jul 13, 2025
830c36d
✨ Feat: Add container network stats and improve data fetching
Its4Nik Jul 17, 2025
15a6d01
✨ Feat: Add theme options
Its4Nik Jul 24, 2025
efb28a0
♻️ Refactor: Apply formatting and consistency improvements
Its4Nik Jul 24, 2025
4e79004
Update dependency graphs
Its4Nik Jul 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.db*
/stacks
/node_modules
*.md
/docker
*.dot
*.svg
*.mmd
*.lock
src/tests
.github
.local-tests
.gitai.json
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ts info@itsnik.de
Binary file added .github/DockStat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions .github/scripts/dep-graph.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

mermaidContent="$(cat dependency-graph.mmd)"

echo "---
config:
flowchart:
defaultRenderer: elk
---

$mermaidContent
" > dependency-graph.mmd

48 changes: 0 additions & 48 deletions .github/workflows/anchore.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/build-dev.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/build-image.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "Continuous Delivery"

on:
release:
types: [published, prereleased]

permissions:
contents: read
packages: write

jobs:
publish:
name: Publish Container Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Determine tags
id: tags
uses: docker/metadata-action@v5
with:
images: ghcr.io/its4nik/dockstatapi
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.tags.outputs.tags }}

sbom:
name: Generate SBOM
runs-on: ubuntu-latest
needs: publish
steps:
- name: Generate SBOM
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: ghcr.io/its4nik/dockstatapi:${{ github.event.release.tag_name }}
format: spdx-json
output: sbom.json

- name: Upload SBOM
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sbom.json
90 changes: 90 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: "Continuous Integration"

on:
push:
pull_request:

jobs:
unit-test:
name: Unit Testing
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
security-events: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Run unit tests
run: |
export PAD_NEW_LINES=false
docker compose -f docker/docker-compose.unit-test.yaml up -d
bun test

- name: Log unit test files
run: |
ls -lah reports/markdown

- name: Publish Test Report
if: always()
run: |
SUMMARY=""
for element in $(ls reports/markdown); do
SUMMARY="$(echo -e "${SUMMARY}\n$(cat "reports/markdown/${element}")")"
done
echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY

build-scan:
name: Build and Security Scan
runs-on: ubuntu-latest
needs: unit-test
permissions:
contents: read
checks: write
security-events: write

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
tags: dockstatapi:ci-${{ github.sha }}
load: true

- name: Start and test container
run: |
docker run --name test-container -d dockstatapi:ci-${{ github.sha }}
sleep 10
docker ps | grep test-container
docker logs test-container
docker stop test-container

- name: Trivy vulnerability scan
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: "dockstatapi:ci-${{ github.sha }}"
format: "sarif"
output: "trivy-results.sarif"
severity: "HIGH,CRITICAL"

- name: Upload security results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"
21 changes: 21 additions & 0 deletions .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update CONTRIBUTORS file
on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: minicli/action-contributors@v3.3
name: "Update a projects CONTRIBUTORS file"
env:
CONTRIB_REPOSITORY: "Its4Nik/DockStatAPI"
CONTRIB_OUTPUT_FILE: "CONTRIBUTORS.md"

- name: Commit changes
uses: test-room-7/action-update-file@v1
with:
file-path: "CONTRIBUTORS.md"
commit-msg: Update Contributors
github-token: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/dependency-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Generate Dependency Graph"

on:
push:

permissions: write-all

jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: oven-sh/setup-bun@v2

- name: Install dependency-cruiser and graphviz
run: |
bun add dependency-cruiser
sudo apt-get install -y graphviz

- name: Generate Mermaid Dependency Graph
run: |
bun run dependency-cruiser --output-type mermaid src/index.ts --output-to dependency-graph.mmd --no-config -x node_modules --ts-pre-compilation-deps --ts-config tsconfig.json
echo "Mermaid graph generated at dependency-graph.mmd"

- name: Convert to ELK Layout
run: |
bash ./.github/scripts/dep-graph.sh

- name: Generate Dependency Graph (SVG)
run: |
bun run dependency-cruiser --output-type dot src/index.ts --output-to dependency-graph.dot --no-config -x node_modules --ts-pre-compilation-deps --ts-config tsconfig.json
dot -T svg -Gsplines=ortho dependency-graph.dot -o dependency-graph.svg
echo "SVG graph generated at dependency-graph.svg"

- name: Commit and Push Changes
uses: EndBug/add-and-commit@v9
with:
add: '["dependency-graph.svg", "dependency-graph.mmd"]'
message: "Update dependency graphs"
committer_name: "GitHub Action"
committer_email: "action@github.com"
Loading