From da4699fe087135ffd2d6902ef0ec65c0bbf59dcc Mon Sep 17 00:00:00 2001 From: t Date: Thu, 2 Apr 2026 14:36:04 -0400 Subject: [PATCH] updated gitignore and ci/cd pipeline --- .gitea/workflows/release.yaml | 10 ++++++++++ .gitignore | 1 - cmd/rr/main.go | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 cmd/rr/main.go diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 79ba1e4..a93eb6f 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -21,6 +21,16 @@ jobs: with: go-version: '1.26.x' + - name: Cache Go Modules and Build Cache + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Run Tests run: go test ./... -v diff --git a/.gitignore b/.gitignore index a57b3bb..d449cd5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ vendor/ # RiskRancher Compiled Binaries # ========================= # Ignore the local builds so you don't accidentally push a 20MB executable -rr rr.exe # ========================= diff --git a/cmd/rr/main.go b/cmd/rr/main.go new file mode 100644 index 0000000..34ab71d --- /dev/null +++ b/cmd/rr/main.go @@ -0,0 +1,32 @@ +package main + +import ( + "log" + "net/http" + + "epigas.gitea.cloud/RiskRancher/core/pkg/datastore" + "epigas.gitea.cloud/RiskRancher/core/pkg/server" + "epigas.gitea.cloud/RiskRancher/core/ui" +) + +var ( + BuildVersion = "dev" + BuildCommit = "none" +) + +func main() { + ui.SetVersionInfo(BuildVersion, BuildCommit) + + db := datastore.InitDB("./data/RiskRancher.db") + + defer db.Close() + + store := datastore.NewSQLiteStore(db) + + app := server.NewApp(store) + + server.RegisterRoutes(app) + + log.Println("🤠 RiskRancher Core Server running on http://localhost:8080") + log.Fatal(http.ListenAndServe(":8080", app.Router)) +}