You've already forked reloading-manager
Fixing Qwertylex's bug.
This commit is contained in:
@@ -7,83 +7,99 @@ name: Build
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
BuildFrontend:
|
BuildFrontend:
|
||||||
name: Build Frontend
|
name: 🔨 Build Frontend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add Siteworx CA
|
|
||||||
|
- name: 🛡 Add Siteworx CA
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -yq ca-certificates curl
|
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
|
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
- name: Checkout code
|
|
||||||
|
- name: 📖 Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Login to Docker Hub
|
|
||||||
|
- name: 🔑 Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Login to Siteworx Registry
|
|
||||||
|
- name: 🔑 Login to Siteworx Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.SITEWORX_USERNAME }}
|
username: ${{ vars.SITEWORX_USERNAME }}
|
||||||
password: ${{ secrets.SITEWORX_PASSWORD }}
|
password: ${{ secrets.SITEWORX_PASSWORD }}
|
||||||
registry: scr.siteworxpro.com
|
registry: scr.siteworxpro.com
|
||||||
- name: Set up Node.js
|
|
||||||
|
- name: ⚙️ Set up Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '22.14.0'
|
node-version: '22.14.0'
|
||||||
- name: Build Container
|
|
||||||
|
- name: 🐳 Build Container
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
file: ./frontend/Dockerfile
|
file: ./frontend/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}
|
tags: scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}
|
||||||
- name: Build Container
|
|
||||||
|
- name: 📦 Build Latest Container
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
file: ./frontend/Dockerfile
|
file: ./frontend/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: scr.siteworxpro.com/reloading-manager/frontend:latest
|
tags: scr.siteworxpro.com/reloading-manager/frontend:latest
|
||||||
|
|
||||||
BuildBackend:
|
BuildBackend:
|
||||||
name: Build Backend
|
name: 🔨 Build Backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add Siteworx CA
|
|
||||||
|
- name: 🛡 Add Siteworx CA
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -yq ca-certificates curl
|
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
|
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
- name: Checkout code
|
|
||||||
|
- name: 📖 Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Login to Docker Hub
|
|
||||||
|
- name: 🔑 Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Login to Siteworx Registry
|
|
||||||
|
- name: 🔑 Login to Siteworx Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.SITEWORX_USERNAME }}
|
username: ${{ vars.SITEWORX_USERNAME }}
|
||||||
password: ${{ secrets.SITEWORX_PASSWORD }}
|
password: ${{ secrets.SITEWORX_PASSWORD }}
|
||||||
registry: scr.siteworxpro.com
|
registry: scr.siteworxpro.com
|
||||||
- name: Set up QEMU
|
|
||||||
|
- name: ⚙️ Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
|
||||||
|
- name: 🏗️ Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Build Container
|
|
||||||
|
- name: 🐳 Build Container
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
file: ./backend/Dockerfile
|
file: ./backend/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}
|
tags: scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}
|
||||||
- name: Build Container
|
|
||||||
|
- name: 📦 Build Latest Container
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
|
|||||||
@@ -5,23 +5,27 @@ on:
|
|||||||
- completed
|
- completed
|
||||||
jobs:
|
jobs:
|
||||||
Deploy:
|
Deploy:
|
||||||
name: Deploy
|
name: 🚀 Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add Siteworx CA
|
|
||||||
|
- name: 🛡 Add Siteworx CA
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -yq ca-certificates curl
|
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
|
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
- name: Checkout code
|
|
||||||
|
- name: 📖 Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Update Deployment Manifest
|
|
||||||
|
- name: 📝 Update Deployment Manifest
|
||||||
run: |
|
run: |
|
||||||
sed "s|scr.siteworxpro.com/reloading-manager/frontend:__TAG__|scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml
|
sed "s|scr.siteworxpro.com/reloading-manager/frontend:__TAG__|scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml
|
||||||
sed "s|scr.siteworxpro.com/reloading-manager/backend:__TAG__|scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml
|
sed "s|scr.siteworxpro.com/reloading-manager/backend:__TAG__|scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml
|
||||||
- name: Commit Changes
|
|
||||||
|
- name: 💾 Commit Changes
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
add: argocd/
|
add: argocd/
|
||||||
|
|||||||
@@ -7,27 +7,27 @@ name: Unit Tests
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-javascript:
|
build-javascript:
|
||||||
name: Run JavaScript Unit Tests
|
name: 🧪 JavaScript Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add Siteworx CA
|
- name: 🛡 Add Siteworx CA
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -yq ca-certificates curl
|
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
|
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
- name: Checkout code
|
- name: 📖 Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Set up Node.js
|
- name: ⚙️ Set up Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '22.14.0'
|
node-version: '22.14.0'
|
||||||
- name: Install dependencies
|
- name: 📦 Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd frontend
|
cd frontend
|
||||||
npm install
|
npm install
|
||||||
- name: Run tests
|
- name: ✅ Run tests
|
||||||
run: |
|
run: |
|
||||||
cd frontend
|
cd frontend
|
||||||
npm run build
|
npm run build
|
||||||
@@ -35,28 +35,28 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GOPRIVATE: 'git.siteworxpro.com'
|
GOPRIVATE: 'git.siteworxpro.com'
|
||||||
GOPROXY: 'direct'
|
GOPROXY: 'direct'
|
||||||
name: Run Goland Unit Tests
|
name: 🔍 Go Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Add Siteworx CA
|
- name: 🛡 Add Siteworx CA
|
||||||
run: |
|
run: |
|
||||||
apt update && apt install -yq ca-certificates curl
|
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
|
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
- name: Set up Go
|
- name: ⚙️ Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.24.0'
|
go-version: '1.24.0'
|
||||||
cache: true
|
cache: true
|
||||||
- name: Checkout code
|
- name: 📖 Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Install dependencies
|
- name: 📦 Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd backend
|
cd backend
|
||||||
go mod download
|
go mod download
|
||||||
- name: Run tests
|
- name: ✅ Run tests
|
||||||
run: |
|
run: |
|
||||||
cd backend
|
cd backend
|
||||||
go test -v ./... -coverprofile=coverage.out
|
go test -v ./... -coverprofile=coverage.out
|
||||||
Reference in New Issue
Block a user