tomekwojcik is savage

This commit is contained in:
2025-04-16 22:38:51 -04:00
parent 1046701bca
commit fc6f9cd230
5 changed files with 101 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ jobs:
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: scr.siteworxpro.com
- name: Set up Node.js
uses: actions/setup-node@v2
with:
@@ -35,7 +36,7 @@ jobs:
file: ./frontend/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: siteworxpro/frontend:${{ gitea.ref_name }}
tags: scr.siteworxpro.com/reloading-manager/frontend:${{ gitea.ref_name }}
- name: Build Container
uses: docker/build-push-action@v6
with:
@@ -43,7 +44,7 @@ jobs:
file: ./frontend/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: siteworxpro/frontend:latest
tags: scr.siteworxpro.com/reloading-manager/frontend:latest
BuildBackend:
name: Build Backend
runs-on: ubuntu-latest
@@ -62,6 +63,7 @@ jobs:
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: scr.siteworxpro.com
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
@@ -73,7 +75,7 @@ jobs:
file: ./backend/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: siteworxpro/backend:${{ gitea.ref_name }}
tags: scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}
- name: Build Container
uses: docker/build-push-action@v6
with:
@@ -81,4 +83,4 @@ jobs:
file: ./backend/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: siteworxpro/backend:latest
tags: scr.siteworxpro.com/reloading-manager/backend:latest

View File

@@ -0,0 +1,30 @@
on:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
Deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Add Siteworx CA
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
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Update Deployment Manifest
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/backend:__TAG__|scr.siteworxpro.com/reloading-manager/backend:${{ gitea.ref_name }}|g" argocd/template/deployment.yml > argocd/deployment/deployment.yml
- name: Commit Changes
uses: EndBug/add-and-commit@v9
with:
add: argocd/
author_name: "GitHub Action"
author_email: gitia@siteworxpro.com
message: "Update deployment manifest with new image tags"