From e3b04a6c270e8085017815a320168f17ae45ac19 Mon Sep 17 00:00:00 2001 From: Frog-Lover-Antony Date: Sat, 18 Jul 2026 20:43:53 +0300 Subject: [PATCH] CI test v3 --- .gitea/workflows/ci.yaml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 21f85fd..9f49e12 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -12,8 +12,7 @@ on: types: [created] env: - WS: /workspace - GITEA_HOST: gitea.mse:80 + GITEA_HOST: gitea.antonene.space jobs: test: @@ -22,13 +21,12 @@ jobs: image: alpine:latest steps: - # --- Clone repo using x-access-token auth --- + # --- Clone repo (own workspace to avoid conflict with Gitea's auto-checkout) --- - name: Checkout Source run: | apk add --no-cache git - rm -rf $WS - mkdir -p $WS - cd $WS + mkdir -p /workspace + cd /workspace git clone "http://x-access-token:${{ secrets.PKG_TOKEN }}@${{ env.GITEA_HOST }}/${{ github.repository }}.git" . git checkout ${{ github.sha }} @@ -36,8 +34,8 @@ jobs: - name: TSV Unit Tests run: | docker run --rm \ - -v $WS:$WS \ - -w $WS/tests \ + -v /workspace:/workspace \ + -w /workspace/tests \ node:22-slim \ node tsv-test.js @@ -81,7 +79,7 @@ jobs: - name: API Sanity Tests (in job container) run: | apk add --no-cache curl jq bash - cd $WS/tests && bash api-tests.sh + cd /workspace/tests && bash api-tests.sh - name: Cleanup Test Container if: always() @@ -99,17 +97,15 @@ jobs: - name: Checkout Source run: | apk add --no-cache git - rm -rf $WS - mkdir -p $WS - cd $WS + mkdir -p /workspace + cd /workspace git clone "http://x-access-token:${{ secrets.PKG_TOKEN }}@${{ env.GITEA_HOST }}/${{ github.repository }}.git" . - git checkout ${{ github.sha }} # --- Build release artifact --- - name: Build Release Artifact run: | apk add --no-cache tar coreutils - cd $WS + cd /workspace mkdir -p release/copyparty-content-tag cp src/*.html src/*.css src/*.js release/copyparty-content-tag/ cd release @@ -124,5 +120,5 @@ jobs: curl -sSf -X POST \ -H "Authorization: token ${{ secrets.PKG_TOKEN }}" \ -H "Content-Type: application/octet-stream" \ - --data-binary @$WS/release/copyparty-content-tag.tar.gz \ + --data-binary @/workspace/release/copyparty-content-tag.tar.gz \ "http://${{ env.GITEA_HOST }}/api/v1/repos/${{ github.repository }}/releases.attachments?name=copyparty-content-tag.tar.gz&tag=$TAG"