From d8d490042f3b0cace4f8fe6712118b321f1de732 Mon Sep 17 00:00:00 2001
From: koalasat <koalasat@satstralia.com>
Date: Thu, 12 Sep 2024 11:07:31 +0200
Subject: [PATCH] Fix self-hosted client image

---
 .github/workflows/frontend-build.yml          | 14 --------------
 .github/workflows/selfhosted-client-image.yml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/.github/workflows/frontend-build.yml b/.github/workflows/frontend-build.yml
index 348a41537..d83121804 100644
--- a/.github/workflows/frontend-build.yml
+++ b/.github/workflows/frontend-build.yml
@@ -57,13 +57,6 @@ jobs:
         path: |
           frontend/static/frontend/*main.js
           frontend/static/frontend/*.wasm
-    - name: 'Archive Web Basic Selfhosted Build Results'
-      uses: actions/upload-artifact@v4
-      with:
-        name: web-basic-selfhosted-js
-        path: |
-          frontend/static/frontend/*basic.selfhosted.js
-          frontend/static/frontend/*.wasm
     - name: 'Archive Web PRO Build Results'
       uses: actions/upload-artifact@v4
       with:
@@ -71,13 +64,6 @@ jobs:
         path: |
           frontend/static/frontend/*pro.js
           frontend/static/frontend/*.wasm
-    - name: 'Archive Web PRO SelhostedBuild Results'
-      uses: actions/upload-artifact@v4
-      with:
-        name: web-pro-selfhosted-js
-        path: |
-          frontend/static/frontend/*pro.selfhosted.js
-          frontend/static/frontend/*.wasm
     - name: 'Archive Mobile Build Results'
       uses: actions/upload-artifact@v4
       with:
diff --git a/.github/workflows/selfhosted-client-image.yml b/.github/workflows/selfhosted-client-image.yml
index 47368e1ec..5555381ee 100644
--- a/.github/workflows/selfhosted-client-image.yml
+++ b/.github/workflows/selfhosted-client-image.yml
@@ -21,21 +21,24 @@ jobs:
     steps:
     - uses: actions/checkout@v4
 
+    - name: 'Copy Static' # Needed since Github actions does not support symlinks
+      run: cp -r frontend/static nodeapp/static
+
     - name: 'Download basic.selfhosted.js Artifact'
       if: inputs.semver == ''  # Only if workflow fired from frontend-build.yml
       uses: dawidd6/action-download-artifact@v6
       with:
         workflow: frontend-build.yml
         workflow_conclusion: success
-        name: web-basic-selfhosted-js
+        name: web-main-js
         path: frontend/static/frontend/
 
     - name: 'Download main.js Artifact for a release'
       if: inputs.semver != ''  # Only if fired as job in release.yml
       uses: actions/download-artifact@v4
       with:
-        name: web-basic-selfhosted-js
-        path: frontend/static/frontend/
+        name: web-main-js
+        path: nodeapp/static/frontend/
 
     - name: 'Download pro.selfhosted.js Artifact'
       if: inputs.semver == ''  # Only if workflow fired from frontend-build.yml
@@ -43,15 +46,15 @@ jobs:
       with:
         workflow: frontend-build.yml
         workflow_conclusion: success
-        name: web-pro-selfhosted-js
-        path: frontend/static/frontend/
+        name: web-pro-js
+        path: nodeapp/static/frontend/
 
     - name: 'Download pro.js Artifact for a release'
       if: inputs.semver != ''  # Only if fired as job in release.yml
       uses: actions/download-artifact@v4
       with:
-        name: web-pro-selfhosted-js
-        path: frontend/static/frontend/
+        name: web-pro-js
+        path: nodeapp/static/frontend/
 
     - name: 'Log in to Docker Hub'
       uses: docker/login-action@v3