You've already forked reloading-manager
That last commit was cringe
This commit is contained in:
@@ -3,42 +3,42 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
name: 🏗️✨ Build Workflow
|
||||
name: 🏗️ ✨ Build Workflow
|
||||
|
||||
jobs:
|
||||
BuildFrontend:
|
||||
name: 🖼️🔨 Build Frontend
|
||||
name: 🖼️ 🔨 Build Frontend
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: 🛡️🔒 Add Siteworx CA Certificates
|
||||
- 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 Repository 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 Docker Buildx
|
||||
- name: 🏗️ 🔧 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: 🐳🔨 Build Frontend Container
|
||||
- name: 🐳 🔨 Build Frontend Container
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
build-args: |
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
tags: scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}
|
||||
push: true
|
||||
|
||||
- name: 📦✨ Build Latest Frontend Container
|
||||
- name: 📦 ✨ Build Latest Frontend Container
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
build-args: |
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
push: true
|
||||
|
||||
BuildBackend:
|
||||
name: 🖥️🔨 Build Backend
|
||||
name: 🖥️ 🔨 Build Backend
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -74,23 +74,23 @@ jobs:
|
||||
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 Docker Buildx
|
||||
- name: 🏗️ 🔧 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: 🐳🔨 Build Backend Container
|
||||
- name: 🐳 🔨 Build Backend Container
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./backend
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
tags: scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}
|
||||
push: true
|
||||
|
||||
- name: 📦✨ Build Latest Backend Container
|
||||
- name: 📦 ✨ Build Latest Backend Container
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./backend
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
push: true
|
||||
|
||||
Deploy:
|
||||
name: 🚀✨ Deploy Application
|
||||
name: 🚀 ✨ Deploy Application
|
||||
runs-on: ubuntu-latest
|
||||
needs: [BuildFrontend, BuildBackend]
|
||||
steps:
|
||||
@@ -118,17 +118,17 @@ jobs:
|
||||
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||
update-ca-certificates
|
||||
|
||||
- name: 📖🔍 Checkout Repository Code
|
||||
- name: 📖 🔍 Checkout Repository Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: 📝🔧 Update Deployment Manifest
|
||||
- name: 📝 🔧 Update Deployment Manifest
|
||||
run: |
|
||||
echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml
|
||||
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml
|
||||
|
||||
- name: 💾✅ Commit Updated Manifest
|
||||
- name: 💾 ✅ Commit Updated Manifest
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
new_branch: release/${{ gitea.ref_name }}-deploy
|
||||
@@ -137,6 +137,6 @@ jobs:
|
||||
author_email: gitia@siteworxpro.com
|
||||
message: "📝🔄 Update deployment manifest with new image tags"
|
||||
|
||||
- name: 🚀✨ Create Pull Request
|
||||
- name: 🚀 ✨ Create Pull Request
|
||||
id: cpr
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
@@ -9,31 +9,31 @@ on:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
name: 🧪✨ Unit Tests Workflow
|
||||
name: 🧪 ✨ Unit Tests Workflow
|
||||
|
||||
jobs:
|
||||
build-javascript:
|
||||
name: 🧪📜 JavaScript Tests
|
||||
name: 🧪 📜 JavaScript Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🛡️🔒 Add Siteworx CA Certificates
|
||||
- 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 Repository Code
|
||||
- name: 📖 🔍 Checkout Repository Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: ⚙️🔧 Set up Node.js Environment
|
||||
- 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 JavaScript Tests
|
||||
- name: ✅ 🧪 Run JavaScript Tests
|
||||
run: |
|
||||
cd frontend
|
||||
npm run build
|
||||
@@ -42,28 +42,28 @@ jobs:
|
||||
env:
|
||||
GOPRIVATE: 'git.siteworxpro.com'
|
||||
GOPROXY: 'direct'
|
||||
name: 🔍🐹 Go Tests
|
||||
name: 🔍 🐹 Go Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🛡️🔒 Add Siteworx CA Certificates
|
||||
- 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 Environment
|
||||
- name: ⚙️ 🐹 Set up Go Environment
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.24.0'
|
||||
cache: true
|
||||
- name: 📖🔍 Checkout Repository 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 Go Tests
|
||||
- name: ✅ 🔍 Run Go Tests
|
||||
run: |
|
||||
cd backend
|
||||
go test -v ./... -coverprofile=coverage.out
|
||||
Reference in New Issue
Block a user