simple wrapper

This commit is contained in:
2024-07-07 19:23:30 +02:00
parent 0ba46e3007
commit a34acbb979
2 changed files with 59 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ jobs:
name: Webui
path: webui/dist
docker-publish:
publish-docker:
runs-on: ubuntu-latest
permissions:
contents: read
@@ -163,3 +163,48 @@ jobs:
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
publish-run-wrapper:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
needs: [build-webui, build-dhfs]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: DHFS Package
path: dhfs-package-downloaded
- uses: actions/download-artifact@v3
with:
name: Webui
path: webui-dist-downloaded
- name: Show all the files
run: find .
- name: Make run wrapper dirs
run: mkdir -p run-wrapper-out/data && mkdir -p run-wrapper-out/fuse && mkdir -p run-wrapper-out/app
- name: Copy DHFS
run: cp -r ./dhfs-package-downloaded "run-wrapper-out/app/DHFS Package"
- name: Copy Webui
run: cp -r ./webui-dist-downloaded "run-wrapper-out/app/Webui"
- name: Copy run wrapper
run: cp -r ./run-wrapper/run.sh "run-wrapper-out/app/"
- uses: actions/upload-artifact@v3
with:
name: Run wrapper
path: run-wrapper-out

13
run-wrapper/run.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
exec java \
-Xmx256M -Ddhfs.objects.writeback.limit=134217728 \
--add-exports java.base/sun.nio.ch=ALL-UNNAMED \
-Ddhfs.objects.persistence.files.root="$SCRIPT_DIR"/../data/objects \
-Ddhfs.objects.root="$SCRIPT_DIR"/../data/configs \
-Ddhfs.fuse.root="$SCRIPT_DIR"/../fuse \
-Dquarkus.http.host=0.0.0.0 \
-Ddhfs.webui.root="$SCRIPT_DIR"/Webui \
-jar "$SCRIPT_DIR"/"DHFS Package"/quarkus-run.jar