diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index a74fc6a..65904cc 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -147,14 +147,16 @@ jobs: - name: Checkout env: TOKEN: ${{ github.token }} - REF: ${{ github.ref }} + SHA: ${{ github.sha }} run: | - apk add --no-cache git - git init - git remote add origin "${{ github.server_url }}/${{ github.repository }}.git" - git config http.extraheader "Authorization: Bearer ${TOKEN}" - git fetch --depth=1 origin "${REF}" - git checkout FETCH_HEAD + # No apk install needed — wget + tar (busybox) are pre-installed in node:20-alpine. + # Downloads the repo tarball directly from Gitea (same machine = instant). + wget -q \ + --header "Authorization: Bearer ${TOKEN}" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/archive/${SHA}.tar.gz" \ + -O /tmp/repo.tar.gz + tar -xzf /tmp/repo.tar.gz --strip-components=1 + rm -f /tmp/repo.tar.gz - name: Install dependencies working-directory: web/dashboard @@ -179,14 +181,16 @@ jobs: - name: Checkout env: TOKEN: ${{ github.token }} - REF: ${{ github.ref }} + SHA: ${{ github.sha }} run: | - apk add --no-cache git - git init - git remote add origin "${{ github.server_url }}/${{ github.repository }}.git" - git config http.extraheader "Authorization: Bearer ${TOKEN}" - git fetch --depth=1 origin "${REF}" - git checkout FETCH_HEAD + # No apk install needed — wget + tar (busybox) are pre-installed in node:20-alpine. + # Downloads the repo tarball directly from Gitea (same machine = instant). + wget -q \ + --header "Authorization: Bearer ${TOKEN}" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/archive/${SHA}.tar.gz" \ + -O /tmp/repo.tar.gz + tar -xzf /tmp/repo.tar.gz --strip-components=1 + rm -f /tmp/repo.tar.gz - name: Install dependencies working-directory: web/admin @@ -211,14 +215,16 @@ jobs: - name: Checkout env: TOKEN: ${{ github.token }} - REF: ${{ github.ref }} + SHA: ${{ github.sha }} run: | - apk add --no-cache git - git init - git remote add origin "${{ github.server_url }}/${{ github.repository }}.git" - git config http.extraheader "Authorization: Bearer ${TOKEN}" - git fetch --depth=1 origin "${REF}" - git checkout FETCH_HEAD + # No apk install needed — wget + tar (busybox) are pre-installed in node:20-alpine. + # Downloads the repo tarball directly from Gitea (same machine = instant). + wget -q \ + --header "Authorization: Bearer ${TOKEN}" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/archive/${SHA}.tar.gz" \ + -O /tmp/repo.tar.gz + tar -xzf /tmp/repo.tar.gz --strip-components=1 + rm -f /tmp/repo.tar.gz - name: Install dependencies working-directory: web/website @@ -243,14 +249,16 @@ jobs: - name: Checkout env: TOKEN: ${{ github.token }} - REF: ${{ github.ref }} + SHA: ${{ github.sha }} run: | - apk add --no-cache git - git init - git remote add origin "${{ github.server_url }}/${{ github.repository }}.git" - git config http.extraheader "Authorization: Bearer ${TOKEN}" - git fetch --depth=1 origin "${REF}" - git checkout FETCH_HEAD + # No apk install needed — wget + tar (busybox) are pre-installed in node:20-alpine. + # Downloads the repo tarball directly from Gitea (same machine = instant). + wget -q \ + --header "Authorization: Bearer ${TOKEN}" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/archive/${SHA}.tar.gz" \ + -O /tmp/repo.tar.gz + tar -xzf /tmp/repo.tar.gz --strip-components=1 + rm -f /tmp/repo.tar.gz - name: Install dependencies working-directory: web/finder