From a8a7d4296a6bbcbdf3424594ba9aab84bdc54ce3 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:11:18 +0100 Subject: [PATCH 01/45] feat: add Dockerfile and CI workflow for image build --- .gitea/bunPipeline/Dockerfile | 18 ++++++++++++++++ .gitea/workflows/bun-image.yml | 38 ++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .gitea/bunPipeline/Dockerfile create mode 100644 .gitea/workflows/bun-image.yml diff --git a/.gitea/bunPipeline/Dockerfile b/.gitea/bunPipeline/Dockerfile new file mode 100644 index 0000000..2a1e3f0 --- /dev/null +++ b/.gitea/bunPipeline/Dockerfile @@ -0,0 +1,18 @@ +from imbios/bun-node + + +jobs: + build: + name: Build and push image + runs-on: ubuntu-latest + container: catthehacker/ubuntu:act-latest + + steps: + - name: Build Docker image + uses: https://git.kjan.de/actions/docker-build@v1 + with: + name: node-npm + REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} + REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/.gitea/workflows/bun-image.yml b/.gitea/workflows/bun-image.yml new file mode 100644 index 0000000..349eb60 --- /dev/null +++ b/.gitea/workflows/bun-image.yml @@ -0,0 +1,38 @@ +name: Build Docker Image + +on: + push: + branches: + - main + paths: + - package.json + - bun.lockb + pull_request: + branches: + - main + paths: + - package.json + - bun.lockb + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: .gitea/bunPipeline + file: .gitea/bunPipeline/Dockerfile + push: true + tags: git.simonis.lol/projects/bun-casino:latest # Change this to your repo + cache-from: type=registry,ref=git.simonis.lol/projects/bun-casino:latest + cache-to: type=inline From ecdcea49947cfedf3d4a261f5da12311b93f9144 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:12:16 +0100 Subject: [PATCH 02/45] ci: remove main branch restriction from workflow --- .gitea/workflows/bun-image.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitea/workflows/bun-image.yml b/.gitea/workflows/bun-image.yml index 349eb60..579cc07 100644 --- a/.gitea/workflows/bun-image.yml +++ b/.gitea/workflows/bun-image.yml @@ -8,8 +8,6 @@ on: - package.json - bun.lockb pull_request: - branches: - - main paths: - package.json - bun.lockb From 0d45d9659a7763cba5f2f190d76b67997c75c6d3 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:12:45 +0100 Subject: [PATCH 03/45] chore: rename bun-image.yml to bun.yml --- .gitea/workflows/{bun-image.yml => bun.yml} | 3 --- 1 file changed, 3 deletions(-) rename .gitea/workflows/{bun-image.yml => bun.yml} (94%) diff --git a/.gitea/workflows/bun-image.yml b/.gitea/workflows/bun.yml similarity index 94% rename from .gitea/workflows/bun-image.yml rename to .gitea/workflows/bun.yml index 579cc07..25805ac 100644 --- a/.gitea/workflows/bun-image.yml +++ b/.gitea/workflows/bun.yml @@ -8,9 +8,6 @@ on: - package.json - bun.lockb pull_request: - paths: - - package.json - - bun.lockb jobs: build: From a50b9be463ab42cca5ec28564a979906e98fa88f Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:16:43 +0100 Subject: [PATCH 04/45] ci: update runner to vps-4 in workflow configuration --- .gitea/workflows/bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 25805ac..6bdfaae 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: vps-4 steps: - name: Checkout repository uses: actions/checkout@v4 From 586044a23d86328d061fb29d6fd9d64601789cc9 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:18:38 +0100 Subject: [PATCH 05/45] chore: clean up Dockerfile by removing unused jobs section --- .gitea/bunPipeline/Dockerfile | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.gitea/bunPipeline/Dockerfile b/.gitea/bunPipeline/Dockerfile index 2a1e3f0..acf3944 100644 --- a/.gitea/bunPipeline/Dockerfile +++ b/.gitea/bunPipeline/Dockerfile @@ -1,18 +1 @@ -from imbios/bun-node - - -jobs: - build: - name: Build and push image - runs-on: ubuntu-latest - container: catthehacker/ubuntu:act-latest - - steps: - - name: Build Docker image - uses: https://git.kjan.de/actions/docker-build@v1 - with: - name: node-npm - REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} - REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file +from imbios/bun-node \ No newline at end of file From 0d67c0e3058ffdcfde7e9dbbe31033d729152d90 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:22:40 +0100 Subject: [PATCH 06/45] ci: add Docker.io login step to workflow configuration --- .gitea/workflows/bun.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 6bdfaae..622bd74 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -22,6 +22,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to Docker.io Registry + uses: https://git.kjan.de/actions/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 + with: + registry: git.simonis.lol + username: ${{ vars.DOCKER_USER }} + password: ${{ vars.DOCKER_PASS }} + - name: Build and push Docker image uses: docker/build-push-action@v5 with: From f8db9221a60de5d276e568f761c6211113b79405 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:24:36 +0100 Subject: [PATCH 07/45] ci: update login-action reference in workflow file --- .gitea/workflows/bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 622bd74..6e44d14 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -23,7 +23,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to Docker.io Registry - uses: https://git.kjan.de/actions/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 + uses: https://git.kjan.de/actions/login-action # v3 with: registry: git.simonis.lol username: ${{ vars.DOCKER_USER }} From ba776f0ec17f1fb52985f6d3e81e3aa292c2cc9f Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:25:16 +0100 Subject: [PATCH 08/45] ci: update Docker login action to version 3 --- .gitea/workflows/bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 6e44d14..d4622f8 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -23,7 +23,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to Docker.io Registry - uses: https://git.kjan.de/actions/login-action # v3 + uses: https://git.kjan.de/actions/login-action@v3 # v3 with: registry: git.simonis.lol username: ${{ vars.DOCKER_USER }} From 9d8509731f837d0bb6ebcb050ca2e482328f8ded Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:27:06 +0100 Subject: [PATCH 09/45] ci: update Docker password variable in workflow file --- .gitea/workflows/bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index d4622f8..7e77a79 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -27,7 +27,7 @@ jobs: with: registry: git.simonis.lol username: ${{ vars.DOCKER_USER }} - password: ${{ vars.DOCKER_PASS }} + password: ${{ vars.DOCKER_PW }} - name: Build and push Docker image uses: docker/build-push-action@v5 From 3433641025e30e6123046bd5a542b2138a2b4827 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:30:05 +0100 Subject: [PATCH 10/45] ci: update paths in bun.yml for build triggers --- .gitea/workflows/bun.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 7e77a79..066b7d9 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -5,9 +5,14 @@ on: branches: - main paths: - - package.json - - bun.lockb + - frontend/package.json + - frontend/bun.lock + - .gitea/bunPipeline/Dockerfile pull_request: + paths: + - frontend/package.json + - frontend/bun.lock + - .gitea/bunPipeline/Dockerfile jobs: build: From 4c376f8375dd2deb191227db272570bc347c9793 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:33:12 +0100 Subject: [PATCH 11/45] build: update Dockerfile and workflow context path --- .gitea/bunPipeline/Dockerfile | 4 +++- .gitea/workflows/bun.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitea/bunPipeline/Dockerfile b/.gitea/bunPipeline/Dockerfile index acf3944..038ace8 100644 --- a/.gitea/bunPipeline/Dockerfile +++ b/.gitea/bunPipeline/Dockerfile @@ -1 +1,3 @@ -from imbios/bun-node \ No newline at end of file +from imbios/bun-node + +COPY . . diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 066b7d9..1b07240 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -37,7 +37,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v5 with: - context: .gitea/bunPipeline + context: frontend file: .gitea/bunPipeline/Dockerfile push: true tags: git.simonis.lol/projects/bun-casino:latest # Change this to your repo From c0ad17490e55be30c872003bbb75f2cba27ccf27 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:34:55 +0100 Subject: [PATCH 12/45] build(Dockerfile): update Dockerfile for bun installation --- .gitea/bunPipeline/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/bunPipeline/Dockerfile b/.gitea/bunPipeline/Dockerfile index 038ace8..3e49ce6 100644 --- a/.gitea/bunPipeline/Dockerfile +++ b/.gitea/bunPipeline/Dockerfile @@ -1,3 +1,6 @@ -from imbios/bun-node +FROM imbios/bun-node -COPY . . +COPY package.json . +COPY bun.lock . + +RUN bun install \ No newline at end of file From aa2bb187ce939cf7b01ea3067c980d35a98bf291 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:37:19 +0100 Subject: [PATCH 13/45] ci: update CI container image for test-build job --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 366770a..59491fe 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: name: test-build runs-on: vps-4 container: - image: catthehacker/ubuntu:act-latest + image: git.simonis.lol/projects/bun-casino:latest steps: - name: Checkout Code uses: actions/checkout@v4 From 313950e99811e66cc010c5f745cd67390076766c Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:42:43 +0100 Subject: [PATCH 14/45] ci: add command to list files in CI workflow --- .gitea/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 59491fe..f2b1654 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -83,6 +83,7 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 + - run: ls -la - name: Install bun uses: oven-sh/setup-bun@v2 - name: Install dependencies From 4ce4f86419f28af107d5aaaa2cbba128bb8a1b06 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:44:04 +0100 Subject: [PATCH 15/45] ci: update checkout step in CI workflow to change dir --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f2b1654..68c7285 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 - - run: ls -la + - run: cd frontend && ls -la - name: Install bun uses: oven-sh/setup-bun@v2 - name: Install dependencies From 50d0782e02c801bb333543f79aa3e3622bf9fd01 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 10:45:29 +0100 Subject: [PATCH 16/45] ci: update CI workflow for frontend directory listing --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 68c7285..974ebca 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -81,9 +81,9 @@ jobs: container: image: git.simonis.lol/projects/bun-casino:latest steps: + - run: cd frontend && ls -la - name: Checkout Code uses: actions/checkout@v4 - - run: cd frontend && ls -la - name: Install bun uses: oven-sh/setup-bun@v2 - name: Install dependencies From 36be142de1ca9e30c38adc6ca88baf3daf34654f Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:04:31 +0100 Subject: [PATCH 17/45] ci: simplify command in CI workflow configuration --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 974ebca..0d084f0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: container: image: git.simonis.lol/projects/bun-casino:latest steps: - - run: cd frontend && ls -la + - run: ls -la - name: Checkout Code uses: actions/checkout@v4 - name: Install bun From 483446cdd9afb5ca3e6c9e57b2962df3e28ae66a Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:08:43 +0100 Subject: [PATCH 18/45] build: update Dockerfile to include CMD instruction --- .gitea/bunPipeline/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/bunPipeline/Dockerfile b/.gitea/bunPipeline/Dockerfile index 3e49ce6..efd56d7 100644 --- a/.gitea/bunPipeline/Dockerfile +++ b/.gitea/bunPipeline/Dockerfile @@ -3,4 +3,6 @@ FROM imbios/bun-node COPY package.json . COPY bun.lock . -RUN bun install \ No newline at end of file +RUN bun install + +CMD ["/bin/sh"] \ No newline at end of file From 82a3f4d195cf6f5e41f9cf14ddbb1a3d8933462c Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:09:08 +0100 Subject: [PATCH 19/45] ci: update CI workflow command to change directory first --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0d084f0..4623d92 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: container: image: git.simonis.lol/projects/bun-casino:latest steps: - - run: ls -la + - run: cd / && ls -la - name: Checkout Code uses: actions/checkout@v4 - name: Install bun From aaff4a543b89c3b3ea5c12fc3b9f6ac75c359f34 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:18:14 +0100 Subject: [PATCH 20/45] ci: update path in CI workflow for proper execution --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4623d92..2b90306 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: container: image: git.simonis.lol/projects/bun-casino:latest steps: - - run: cd / && ls -la + - run: cd /home/bun/app && ls -la - name: Checkout Code uses: actions/checkout@v4 - name: Install bun From c7acd8271a47b46b000fed825b2aae27a1cdbf7b Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:19:48 +0100 Subject: [PATCH 21/45] ci: update CI workflow to copy node_modules instead of bun --- .gitea/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2b90306..d13b1f7 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -84,12 +84,10 @@ jobs: - run: cd /home/bun/app && ls -la - name: Checkout Code uses: actions/checkout@v4 - - name: Install bun - uses: oven-sh/setup-bun@v2 - name: Install dependencies run: | cd frontend - bun install + cp -r /home/bun/app/node_modules . - name: Test build run: | cd frontend From c0e7f5f7f85fa0562b3484511816f7a0cb897a26 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:21:29 +0100 Subject: [PATCH 22/45] ci: add bun install to CI workflow for frontend setup --- .gitea/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d13b1f7..52c16e4 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -88,6 +88,7 @@ jobs: run: | cd frontend cp -r /home/bun/app/node_modules . + bun install - name: Test build run: | cd frontend From 876d174f8fed19dd72b80e2d0ac141b1fee174b4 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:24:45 +0100 Subject: [PATCH 23/45] ci: update CI workflow to remove bun installation step --- .gitea/workflows/ci.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 52c16e4..2fc38dd 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -45,12 +45,10 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 - - name: Install bun - uses: oven-sh/setup-bun@v2 - name: Install dependencies run: | cd frontend - bun install + cp -r /home/bun/app/node_modules . - name: Run Eslint run: | cd frontend @@ -64,12 +62,10 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 - - name: Install bun - uses: oven-sh/setup-bun@v2 - name: Install dependencies run: | cd frontend - bun install + cp -r /home/bun/app/node_modules . - name: Run prettier run: | cd frontend @@ -81,14 +77,12 @@ jobs: container: image: git.simonis.lol/projects/bun-casino:latest steps: - - run: cd /home/bun/app && ls -la - name: Checkout Code uses: actions/checkout@v4 - name: Install dependencies run: | cd frontend cp -r /home/bun/app/node_modules . - bun install - name: Test build run: | cd frontend From 0b61ce11e1bcb6a6a3798b0c19d2579602aaea95 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:27:01 +0100 Subject: [PATCH 24/45] build(ci): update container image for CI jobs --- .gitea/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2fc38dd..9881355 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: name: eslint runs-on: vps-4 container: - image: catthehacker/ubuntu:act-latest + image: git.simonis.lol/projects/bun-casino:latest steps: - name: Checkout Code uses: actions/checkout@v4 @@ -58,7 +58,7 @@ jobs: name: prettier runs-on: vps-4 container: - image: catthehacker/ubuntu:act-latest + image: git.simonis.lol/projects/bun-casino:latest steps: - name: Checkout Code uses: actions/checkout@v4 From c258f1014d53fa83216b117b6274e814ca3ebe08 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:30:20 +0100 Subject: [PATCH 25/45] ci: update dependency installation to use symlink --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9881355..80e9c89 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: - name: Install dependencies run: | cd frontend - cp -r /home/bun/app/node_modules . + ln -s /home/bun/app/node_modules node_modules - name: Test build run: | cd frontend From bb24af241cd5ff2536e5c27c7551055ce73e7954 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:35:44 +0100 Subject: [PATCH 26/45] ci: add timing to node_modules symlink creation step --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 80e9c89..0aec5ee 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: - name: Install dependencies run: | cd frontend - ln -s /home/bun/app/node_modules node_modules + time ln -s /home/bun/app/node_modules node_modules - name: Test build run: | cd frontend From 6fb3f2bef2b93a74c59b267881d39c12114d9bdd Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:36:51 +0100 Subject: [PATCH 27/45] ci: remove time command from CI workflow script --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0aec5ee..80e9c89 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: - name: Install dependencies run: | cd frontend - time ln -s /home/bun/app/node_modules node_modules + ln -s /home/bun/app/node_modules node_modules - name: Test build run: | cd frontend From 7533f1139c21087d717bf113c73646b18c6b4ee8 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:38:18 +0100 Subject: [PATCH 28/45] ci: update workflow trigger for bun.yml file --- .gitea/workflows/bun.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml index 1b07240..0c6af27 100644 --- a/.gitea/workflows/bun.yml +++ b/.gitea/workflows/bun.yml @@ -2,13 +2,6 @@ name: Build Docker Image on: push: - branches: - - main - paths: - - frontend/package.json - - frontend/bun.lock - - .gitea/bunPipeline/Dockerfile - pull_request: paths: - frontend/package.json - frontend/bun.lock From c55fcd9ea06d22b0483bddafd85820dc1f8e2368 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:40:53 +0100 Subject: [PATCH 29/45] ci: update CI workflow to install dependencies correctly --- .gitea/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 80e9c89..e418620 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -45,13 +45,10 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 - - name: Install dependencies - run: | - cd frontend - cp -r /home/bun/app/node_modules . - name: Run Eslint run: | cd frontend + cp -r /home/bun/app/node_modules . bun run lint prettier: From bd26ded681cae4ce4b09c8be7a131b5f9a1e57ea Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:45:20 +0100 Subject: [PATCH 30/45] ci: update CI workflow for bun installation and caching --- .gitea/workflows/ci.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e418620..e1c1496 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -41,28 +41,35 @@ jobs: name: eslint runs-on: vps-4 container: - image: git.simonis.lol/projects/bun-casino:latest + image: catthehacker/ubuntu:act-latest steps: - name: Checkout Code uses: actions/checkout@v4 + - name: Install bun + uses: oven-sh/setup-bun@v2 + - name: Install dependencies + run: | + cd frontend + bun install - name: Run Eslint run: | cd frontend - cp -r /home/bun/app/node_modules . bun run lint prettier: name: prettier runs-on: vps-4 container: - image: git.simonis.lol/projects/bun-casino:latest + image: catthehacker/ubuntu:act-latest steps: - name: Checkout Code uses: actions/checkout@v4 + - name: Install bun + uses: oven-sh/setup-bun@v2 - name: Install dependencies run: | cd frontend - cp -r /home/bun/app/node_modules . + bun install - name: Run prettier run: | cd frontend @@ -72,14 +79,25 @@ jobs: name: test-build runs-on: vps-4 container: - image: git.simonis.lol/projects/bun-casino:latest + image: catthehacker/ubuntu:act-latest steps: - name: Checkout Code uses: actions/checkout@v4 + - name: Install bun + uses: oven-sh/setup-bun@v2 + - uses: actions/cache@v3 + working-directory: ./frontend + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-bun- + restore-keys: | + ${{ runner.os }}-bun- - name: Install dependencies run: | cd frontend - ln -s /home/bun/app/node_modules node_modules + bun install - name: Test build run: | cd frontend From a19ddeed47782f53366e4edbe78a800276060140 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:50:07 +0100 Subject: [PATCH 31/45] ci: update cache paths in CI configuration --- .gitea/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e1c1496..db9cb0e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -89,8 +89,7 @@ jobs: working-directory: ./frontend with: path: | - ~/.gradle/caches - ~/.gradle/wrapper + node_modules key: ${{ runner.os }}-bun- restore-keys: | ${{ runner.os }}-bun- From 59263dca710cbd33959ccc99d7b63010ea98b702 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:54:35 +0100 Subject: [PATCH 32/45] ci: update path for node_modules in CI workflow --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index db9cb0e..c145f8f 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: working-directory: ./frontend with: path: | - node_modules + ~/node_modules key: ${{ runner.os }}-bun- restore-keys: | ${{ runner.os }}-bun- From fadedb0bcdcab7f2c8673670f967e604576509b0 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:57:08 +0100 Subject: [PATCH 33/45] ci: Fix node_modules path in CI workflow configuration --- .gitea/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c145f8f..7523a92 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: working-directory: ./frontend with: path: | - ~/node_modules + ~/node_modules/ key: ${{ runner.os }}-bun- restore-keys: | ${{ runner.os }}-bun- @@ -97,6 +97,7 @@ jobs: run: | cd frontend bun install + - run: cd frontend && ls -la - name: Test build run: | cd frontend From 2392dac5193b43431d6db8b3cf83b5f8e4b5dd92 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 11:58:56 +0100 Subject: [PATCH 34/45] ci: update path in CI workflow configuration --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7523a92..a5cf425 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: working-directory: ./frontend with: path: | - ~/node_modules/ + node_modules/ key: ${{ runner.os }}-bun- restore-keys: | ${{ runner.os }}-bun- From ef8111cc7e38e75edf0dea681fec872867caa207 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:01:14 +0100 Subject: [PATCH 35/45] ci: update node_modules path in CI workflow config --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a5cf425..c90932e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: working-directory: ./frontend with: path: | - node_modules/ + frontend/node_modules/ key: ${{ runner.os }}-bun- restore-keys: | ${{ runner.os }}-bun- From 0590a2f9ee59bc82908694c4309086ffbb94a84d Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:05:59 +0100 Subject: [PATCH 36/45] build(ci): add caching for frontend dependencies and dist --- .gitea/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c90932e..93dd2e6 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -47,6 +47,14 @@ jobs: uses: actions/checkout@v4 - name: Install bun uses: oven-sh/setup-bun@v2 + - uses: actions/cache@v3 + working-directory: ./frontend + with: + path: | + frontend/node_modules/ + key: ${{ runner.os }}-bun- + restore-keys: | + ${{ runner.os }}-bun- - name: Install dependencies run: | cd frontend @@ -66,6 +74,14 @@ jobs: uses: actions/checkout@v4 - name: Install bun uses: oven-sh/setup-bun@v2 + - uses: actions/cache@v3 + working-directory: ./frontend + with: + path: | + frontend/node_modules/ + key: ${{ runner.os }}-bun- + restore-keys: | + ${{ runner.os }}-bun- - name: Install dependencies run: | cd frontend @@ -93,6 +109,14 @@ jobs: key: ${{ runner.os }}-bun- restore-keys: | ${{ runner.os }}-bun- + - uses: actions/cache@v3 + working-directory: ./frontend + with: + path: | + frontend/dist/ + key: ${{ runner.os }}-dist- + restore-keys: | + ${{ runner.os }}-dist- - name: Install dependencies run: | cd frontend From 355d1b0c0674262fa88008d34536414228fbb73e Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:09:22 +0100 Subject: [PATCH 37/45] ci: update frontend build process in CI workflow --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 93dd2e6..2aad3da 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -121,8 +121,8 @@ jobs: run: | cd frontend bun install - - run: cd frontend && ls -la - name: Test build run: | cd frontend bun run build + ls -la From 642f5727e504eb8d0b3b6ecde102b1c86961ac2a Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:16:50 +0100 Subject: [PATCH 38/45] ci: update build output directory in CI workflow --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2aad3da..1cf525b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -125,4 +125,4 @@ jobs: run: | cd frontend bun run build - ls -la + ls -la dist From 72f56928d4c1a8f4eb4f662a7705e692cadddeef Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:23:32 +0100 Subject: [PATCH 39/45] ci: add linelint job to CI workflow --- .gitea/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1cf525b..92963eb 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,6 +4,16 @@ on: pull_request: jobs: + linelint: + runs-on: ubuntu-latest + name: Check if all files end in newline + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Linelint + uses: actions/linelint@master + id: linelint + checkstyle: name: "Checkstyle Main" runs-on: "vps-4" @@ -124,5 +134,4 @@ jobs: - name: Test build run: | cd frontend - bun run build - ls -la dist + bun run build --no-clean From 8da1ff8acd9f6119e2a25a56909123f904f198ca Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:24:55 +0100 Subject: [PATCH 40/45] ci: update CI runner to vps-4 from ubuntu-latest --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 92963eb..c7f8f20 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -5,7 +5,7 @@ on: jobs: linelint: - runs-on: ubuntu-latest + runs-on: vps-4 name: Check if all files end in newline steps: - name: Checkout From 5cb08ca5f8e5180b318d5e62663edfc8581e1834 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:27:29 +0100 Subject: [PATCH 41/45] ci: update build command in CI workflow --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c7f8f20..874b931 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -134,4 +134,4 @@ jobs: - name: Test build run: | cd frontend - bun run build --no-clean + bun run build From da50d19f9d2ddde99d8dd2c8ed938525e25a4305 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:30:07 +0100 Subject: [PATCH 42/45] ci: update CI workflow to use Super-linter for linting --- .gitea/workflows/ci.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 874b931..43378a8 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,15 +4,26 @@ on: pull_request: jobs: - linelint: + build: + name: Lint runs-on: vps-4 - name: Check if all files end in newline + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Linelint - uses: actions/linelint@master - id: linelint + - name: Checkout code + uses: actions/checkout@v4 + with: + # super-linter needs the full git history to get the + # list of files that changed across commits + fetch-depth: 0 + + - name: Super-linter + uses: super-linter/super-linter@v7.2.1 # x-release-please-version checkstyle: name: "Checkstyle Main" From 8547bd1fa32d1bf511a0a080556dff55dc4c2a2d Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:36:22 +0100 Subject: [PATCH 43/45] ci: remove lint job from CI configuration --- .gitea/workflows/ci.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 43378a8..9652bf0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,27 +4,6 @@ on: pull_request: jobs: - build: - name: Lint - runs-on: vps-4 - - permissions: - contents: read - packages: read - # To report GitHub Actions status checks - statuses: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - # super-linter needs the full git history to get the - # list of files that changed across commits - fetch-depth: 0 - - - name: Super-linter - uses: super-linter/super-linter@v7.2.1 # x-release-please-version - checkstyle: name: "Checkstyle Main" runs-on: "vps-4" From 0c7c2ae9fa0e9d8faf5ff3118c7892a32fae089e Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:48:03 +0100 Subject: [PATCH 44/45] chore: remove obsolete Docker build workflow file --- .gitea/workflows/bun.yml | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .gitea/workflows/bun.yml diff --git a/.gitea/workflows/bun.yml b/.gitea/workflows/bun.yml deleted file mode 100644 index 0c6af27..0000000 --- a/.gitea/workflows/bun.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build Docker Image - -on: - push: - paths: - - frontend/package.json - - frontend/bun.lock - - .gitea/bunPipeline/Dockerfile - -jobs: - build: - runs-on: vps-4 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker.io Registry - uses: https://git.kjan.de/actions/login-action@v3 # v3 - with: - registry: git.simonis.lol - username: ${{ vars.DOCKER_USER }} - password: ${{ vars.DOCKER_PW }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: frontend - file: .gitea/bunPipeline/Dockerfile - push: true - tags: git.simonis.lol/projects/bun-casino:latest # Change this to your repo - cache-from: type=registry,ref=git.simonis.lol/projects/bun-casino:latest - cache-to: type=inline From 356a599dd5d2ede375ad8d94775dab3e4fc001e7 Mon Sep 17 00:00:00 2001 From: Jan Klattenhoff Date: Wed, 19 Feb 2025 12:48:40 +0100 Subject: [PATCH 45/45] chore: remove unused Dockerfile from bunPipeline --- .gitea/bunPipeline/Dockerfile | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .gitea/bunPipeline/Dockerfile diff --git a/.gitea/bunPipeline/Dockerfile b/.gitea/bunPipeline/Dockerfile deleted file mode 100644 index efd56d7..0000000 --- a/.gitea/bunPipeline/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM imbios/bun-node - -COPY package.json . -COPY bun.lock . - -RUN bun install - -CMD ["/bin/sh"] \ No newline at end of file