Inside we both know what's been going on

This commit is contained in:
2025-04-17 00:02:43 -04:00
parent 080a14a8cd
commit 8fef0bde6b
4 changed files with 44 additions and 43 deletions

View File

@@ -3,42 +3,42 @@ on:
tags:
- '**'
name: Build
name: 🏗️✨ Build Workflow
jobs:
BuildFrontend:
name: 🔨 Build Frontend
name: 🖼️🔨 Build Frontend
runs-on: ubuntu-latest
steps:
- name: 🛡 Add Siteworx CA
- name: 🛡️🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: 📖 Checkout code
- name: 📖🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: 🔑 Login to Docker Hub
- name: 🔑🔐 Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🔑 Login to Siteworx Registry
- name: 🔑🛠️ Login to Siteworx Registry
uses: docker/login-action@v3
with:
username: ${{ vars.SITEWORX_USERNAME }}
password: ${{ secrets.SITEWORX_PASSWORD }}
registry: scr.siteworxpro.com
- name: ⚙️ Set up QEMU
- name: ⚙️🛠️ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🐳 Build Container
- name: 🐳🔨 Build Frontend Container
uses: docker/build-push-action@v6
with:
context: ./frontend
@@ -47,7 +47,7 @@ jobs:
tags: scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}
push: true
- name: 📦 Build Latest Container
- name: 📦 Build Latest Frontend Container
uses: docker/build-push-action@v6
with:
context: ./frontend
@@ -57,41 +57,41 @@ jobs:
push: true
BuildBackend:
name: 🔨 Build Backend
name: 🖥️🔨 Build Backend
runs-on: ubuntu-latest
steps:
- name: 🛡 Add Siteworx CA
- name: 🛡️🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: 📖 Checkout code
- name: 📖🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: 🔑 Login to Docker Hub
- name: 🔑🔐 Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🔑 Login to Siteworx Registry
- name: 🔑🛠️ Login to Siteworx Registry
uses: docker/login-action@v3
with:
username: ${{ vars.SITEWORX_USERNAME }}
password: ${{ secrets.SITEWORX_PASSWORD }}
registry: scr.siteworxpro.com
- name: ⚙️ Set up QEMU
- name: ⚙️🛠️ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🏗️ Set up Docker Buildx
- name: 🏗️🔧 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 🐳 Build Container
- name: 🐳🔨 Build Backend Container
uses: docker/build-push-action@v6
with:
context: ./backend
@@ -100,7 +100,7 @@ jobs:
tags: scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}
push: true
- name: 📦 Build Latest Container
- name: 📦 Build Latest Backend Container
uses: docker/build-push-action@v6
with:
context: ./backend

View File

@@ -5,29 +5,29 @@ on:
- completed
jobs:
Deploy:
name: 🚀 Deploy
name: 🚀 Deploy Application
runs-on: ubuntu-latest
steps:
- name: 🛡 Add Siteworx CA
- name: 🛡️🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: 📖 Checkout code
- name: 📖🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: 📝 Update Deployment Manifest
- name: 📝🔧 Update Deployment Manifest
run: |
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml
- name: 💾 Commit Changes
- name: 💾 Commit Updated Manifest
uses: EndBug/add-and-commit@v9
with:
add: argocd/deployment/deployment.yml
author_name: "GitHub Action"
author_name: "GitHub Action 🤖"
author_email: gitia@siteworxpro.com
message: "Update deployment manifest with new image tags"
message: "📝🔄 Update deployment manifest with new image tags"

View File

@@ -3,60 +3,61 @@ on:
branches:
- "*"
name: Unit Tests
name: 🧪✨ Unit Tests
jobs:
build-javascript:
name: 🧪 JavaScript Tests
name: 🧪📜 JavaScript Tests
runs-on: ubuntu-latest
steps:
- name: 🛡 Add Siteworx CA
- name: 🛡️🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: 📖 Checkout code
- name: 📖🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: ⚙️ Set up Node.js
- name: ⚙️🔧 Set up Node.js Environment
uses: actions/setup-node@v2
with:
node-version: '22.14.0'
- name: 📦 Install dependencies
- name: 📦📥 Install Dependencies
run: |
cd frontend
npm install
- name: ✅ Run tests
- name: 🧪 Run JavaScript Tests
run: |
cd frontend
npm run build
test-go:
env:
GOPRIVATE: 'git.siteworxpro.com'
GOPROXY: 'direct'
name: 🔍 Go Tests
name: 🔍🐹 Go Tests
runs-on: ubuntu-latest
steps:
- name: 🛡 Add Siteworx CA
- name: 🛡️🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: ⚙️ Set up Go
- name: ⚙️🐹 Set up Go Environment
uses: actions/setup-go@v2
with:
go-version: '1.24.0'
cache: true
- name: 📖 Checkout code
- name: 📖🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: 📦 Install dependencies
- name: 📦📥 Install Dependencies
run: |
cd backend
go mod download
- name: ✅ Run tests
- name: 🔍 Run Go Tests
run: |
cd backend
go test -v ./... -coverprofile=coverage.out

View File

@@ -97,18 +97,18 @@ func main() {
addr := fmt.Sprintf("0.0.0.0:%s", Port.GetEnvString("8080"))
e.Logger.Info("Starting Server...")
e.Logger.Infof("Listening on %v", addr)
e.Logger.Info("🚀 Starting Server...")
e.Logger.Infof("🎧 Listening on %v", addr)
e.Logger.Fatal(e.Start(addr))
}
func migrate(e *echo.Echo) {
e.Logger.Info("Starting migrations...")
e.Logger.Info("🛠️ Starting migrations...")
db := database.GetNewDatabase()
defer db.Db.Close(context.Background())
db.Migrate()
e.Logger.Info("Done!")
e.Logger.Info("🛠️ Starting migrations...")
}