diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d6a01b9..3a53e46 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -94,6 +94,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Generate VERSION file + run: | + VERSION=$(git describe --tags --dirty 2>/dev/null | sed 's/^v//' || echo "0.0.0-dev") + echo "$VERSION" > backend/VERSION + - name: Build Docker image run: docker build -t obsigate:ci . @@ -119,21 +124,21 @@ jobs: - name: Start ObsiGate run: | - docker run -d --name obsigate-e2e -p 2020:8080 \ + docker rm -f obsigate-e2e 2>/dev/null || true + docker run -d --name obsigate-e2e -p 2029:8080 \ -v $(pwd)/test_vault:/vaults/TestVault \ -v $(pwd)/test_dir:/vaults/TestDir \ -e VAULT_1_NAME=TestVault \ -e VAULT_1_PATH=/vaults/TestVault \ -e DIR_1_NAME=TestDir \ - - name: Start ObsiGate - run: | - docker rm -f obsigate-e2e 2>/dev/null || true - docker run -d --name obsigate-e2e -p 2029:8080 -v $(pwd)/test_vault:/vaults/TestVault -v $(pwd)/test_dir:/vaults/TestDir -e VAULT_1_NAME=TestVault -e VAULT_1_PATH=/vaults/TestVault -e DIR_1_NAME=TestDir -e DIR_1_PATH=/vaults/TestDir -e OBSIGATE_AUTH_ENABLED=false obsigate:ci - # Wait for health check - for i in $(seq 1 30); do - curl -s http://localhost:2029/api/health && break - sleep 1 - done + -e DIR_1_PATH=/vaults/TestDir \ + -e OBSIGATE_AUTH_ENABLED=false \ + obsigate:ci + # Wait for health check + for i in $(seq 1 30); do + curl -s http://localhost:2029/api/health && break + sleep 1 + done - name: Run E2E tests run: npx playwright test --project=chromium-desktop --reporter=list