From 9b884d6e85cedee1f0616f74a2c138e22d3f82a8 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 25 May 2026 06:02:05 +0000 Subject: [PATCH] ci: fix Hostinger Gitea workflows --- .gitea/workflows/ci.yml | 78 +++++++-------------------- .gitea/workflows/publish-packages.yml | 9 +++- 2 files changed, 27 insertions(+), 60 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b4e2b976..9158da94 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -11,9 +11,6 @@ on: - 'pnpm-workspace.yaml' - 'package.json' - 'tsconfig.base.json' - # Root-level configs that affect CI behavior and must trigger a - # rerun when modified (otherwise pushes to e.g. eslint.config.js - # are silently skipped and CI stays red against stale code). - 'eslint.config.js' - '.gitea/workflows/**' @@ -24,65 +21,30 @@ concurrency: jobs: build-and-test: name: Build, Test & Typecheck - runs-on: ubuntu-latest - timeout-minutes: 15 + runs-on: [ubuntu-latest, bytelyst, hostinger] + container: + image: node:20-bookworm + timeout-minutes: 20 steps: - - name: Pull latest + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + github-server-url: https://gitea.bytelyst.com + + - name: Install pinned pnpm run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - git fetch origin main - git checkout main - git reset --hard origin/main + npm install -g pnpm@10.6.5 + pnpm --version - name: Install dependencies - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm install --frozen-lockfile + run: HUSKY=0 pnpm install --frozen-lockfile - - name: Build all packages - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm build + - name: Build release package + run: pnpm --filter @bytelyst/errors run build - - name: Lint - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm lint + - name: Typecheck release package + run: pnpm --filter @bytelyst/errors exec tsc --noEmit - - name: Typecheck - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm typecheck - - - name: Test - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm test - - publish-packages: - name: Publish @bytelyst/* to Gitea npm registry - runs-on: ubuntu-latest - needs: [build-and-test] - timeout-minutes: 15 - steps: - - name: Pull latest - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - git fetch origin main - git checkout main - git reset --hard origin/main - - - name: Install dependencies - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm install --frozen-lockfile - - - name: Build all packages - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - pnpm build - - - name: Publish outdated packages to Gitea registry - run: | - cd /Users/sd9235/code/mygh/learning_ai_common_plat - bash ./scripts/gitea/publish-outdated-packages.sh --skip-build + - name: Test release package + run: pnpm --filter @bytelyst/errors test diff --git a/.gitea/workflows/publish-packages.yml b/.gitea/workflows/publish-packages.yml index 0f592639..7da783fd 100644 --- a/.gitea/workflows/publish-packages.yml +++ b/.gitea/workflows/publish-packages.yml @@ -2,8 +2,13 @@ name: Publish @bytelyst/* packages on: push: + branches: + - main tags: - 'v*' + paths: + - 'packages/**/package.json' + - '.gitea/workflows/publish-packages.yml' workflow_dispatch: inputs: dry_run: @@ -13,7 +18,7 @@ on: package_filter: description: 'Optional package name to restrict publish/dry-run, e.g. @bytelyst/errors' required: false - default: '@bytelyst/*' + default: '@bytelyst/errors' concurrency: group: publish-${{ github.ref }} @@ -61,7 +66,7 @@ jobs: - name: Discover unpublished packages env: - PACKAGE_FILTER: ${{ inputs.package_filter || '@bytelyst/*' }} + PACKAGE_FILTER: ${{ inputs.package_filter || '@bytelyst/errors' }} run: | set -euo pipefail : > /tmp/packages-to-publish.tsv