Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da4699fe08 | |||
| d881051f3e |
@@ -2,9 +2,9 @@ name: Build and Release Core
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ] # Runs tests on standard pushes
|
||||
branches: [ main ]
|
||||
tags:
|
||||
- 'v*' # Runs tests AND builds/releases on tags
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
@@ -19,7 +19,17 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.24' # Note: Adjusted to a currently valid Go version
|
||||
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
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,7 +16,6 @@ vendor/
|
||||
# RiskRancher Compiled Binaries
|
||||
# =========================
|
||||
# Ignore the local builds so you don't accidentally push a 20MB executable
|
||||
rr
|
||||
rr.exe
|
||||
|
||||
# =========================
|
||||
|
||||
32
cmd/rr/main.go
Normal file
32
cmd/rr/main.go
Normal file
@@ -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))
|
||||
}
|
||||
Reference in New Issue
Block a user