From e027afe89d47bdf00c50ced538415812e7234727 Mon Sep 17 00:00:00 2001 From: Admin Date: Sun, 8 Mar 2026 22:42:31 +0500 Subject: [PATCH] ci: remove just from Linux workflows, drop redundant scraper build job, consolidate to Docker Hub --- .gitea/workflows/ci-scraper.yaml | 50 ++++++------------------------- .gitea/workflows/ci-ui.yaml | 18 +++++------ .gitea/workflows/ios-release.yaml | 4 +++ .gitea/workflows/release-ui.yaml | 23 ++++++-------- 4 files changed, 30 insertions(+), 65 deletions(-) diff --git a/.gitea/workflows/ci-scraper.yaml b/.gitea/workflows/ci-scraper.yaml index c17b175..7c9b293 100644 --- a/.gitea/workflows/ci-scraper.yaml +++ b/.gitea/workflows/ci-scraper.yaml @@ -2,16 +2,14 @@ name: CI / Scraper on: push: - branches: ["main", "master"] + branches: ["main", "master", "v2"] paths: - "scraper/**" - - "justfile" - ".gitea/workflows/ci-scraper.yaml" pull_request: - branches: ["main", "master"] + branches: ["main", "master", "v2"] paths: - "scraper/**" - - "justfile" - ".gitea/workflows/ci-scraper.yaml" concurrency: @@ -31,11 +29,11 @@ jobs: go-version-file: scraper/go.mod cache-dependency-path: scraper/go.sum - - name: Install just - run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin - - name: go vet - run: just lint + working-directory: scraper + run: | + go vet ./... + go vet -tags integration ./... # ── tests ──────────────────────────────────────────────────────────────────── test: @@ -49,45 +47,15 @@ jobs: go-version-file: scraper/go.mod cache-dependency-path: scraper/go.sum - - name: Install just - run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin - - name: Run tests - run: just test - - # ── build binary ───────────────────────────────────────────────────────────── - build: - name: Build - runs-on: ubuntu-latest - needs: [lint, test] - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version-file: scraper/go.mod - cache-dependency-path: scraper/go.sum - - - name: Install just - run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin - - - name: Build binary - run: | - cd scraper && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ - go build -ldflags="-s -w" -o bin/scraper ./cmd/scraper - - - name: Upload binary artifact - uses: actions/upload-artifact@v4 - with: - name: scraper-linux-amd64 - path: scraper/bin/scraper - retention-days: 7 + working-directory: scraper + run: go test -short -race -count=1 -timeout=60s ./... # ── push to Docker Hub ─────────────────────────────────────────────────────── docker: name: Docker Push runs-on: ubuntu-latest - needs: build + needs: [lint, test] if: gitea.event_name == 'push' steps: - uses: actions/checkout@v4 diff --git a/.gitea/workflows/ci-ui.yaml b/.gitea/workflows/ci-ui.yaml index a8b021a..ad396ca 100644 --- a/.gitea/workflows/ci-ui.yaml +++ b/.gitea/workflows/ci-ui.yaml @@ -2,16 +2,14 @@ name: CI / UI on: push: - branches: ["main", "master"] + branches: ["main", "master", "v2"] paths: - "ui/**" - - "justfile" - ".gitea/workflows/ci-ui.yaml" pull_request: - branches: ["main", "master"] + branches: ["main", "master", "v2"] paths: - "ui/**" - - "justfile" - ".gitea/workflows/ci-ui.yaml" concurrency: @@ -23,6 +21,9 @@ jobs: build: name: Build runs-on: ubuntu-latest + defaults: + run: + working-directory: ui steps: - uses: actions/checkout@v4 @@ -32,17 +33,14 @@ jobs: cache: npm cache-dependency-path: ui/package-lock.json - - name: Install just - run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin - - name: Install dependencies - run: just ui-install + run: npm ci - name: Type check - run: just ui-check + run: npm run check - name: Build - run: just ui-build + run: npm run build # ── push to Docker Hub ─────────────────────────────────────────────────────── docker: diff --git a/.gitea/workflows/ios-release.yaml b/.gitea/workflows/ios-release.yaml index 208ad5b..8aabeb7 100644 --- a/.gitea/workflows/ios-release.yaml +++ b/.gitea/workflows/ios-release.yaml @@ -5,6 +5,10 @@ on: tags: - "ios-v*" +concurrency: + group: ${{ gitea.workflow }}-${{ gitea.ref }} + cancel-in-progress: true + jobs: # ── archive & release to TestFlight ────────────────────────────────────── # Triggered only on ios-v* tags (e.g. ios-v1.0.0). diff --git a/.gitea/workflows/release-ui.yaml b/.gitea/workflows/release-ui.yaml index 2b564d7..589b395 100644 --- a/.gitea/workflows/release-ui.yaml +++ b/.gitea/workflows/release-ui.yaml @@ -9,15 +9,14 @@ concurrency: group: ${{ gitea.workflow }}-${{ gitea.ref }} cancel-in-progress: true -defaults: - run: - working-directory: ui - jobs: # ── type-check & build ─────────────────────────────────────────────────────── build: name: Build runs-on: ubuntu-latest + defaults: + run: + working-directory: ui steps: - uses: actions/checkout@v4 @@ -41,33 +40,29 @@ jobs: name: Docker runs-on: ubuntu-latest needs: [build] - defaults: - run: - working-directory: . steps: - uses: actions/checkout@v4 - - name: Log in to Gitea registry + - name: Log in to Docker Hub uses: docker/login-action@v3 with: - registry: gitea.kalekber.cc - username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_TOKEN }} + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_TOKEN }} - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: gitea.kalekber.cc/kamil/libnovel-ui + images: ${{ secrets.DOCKER_USER }}/libnovel-ui tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=raw,value=latest - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: - context: ./ui + context: ui push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}