ci: fix Hostinger Gitea workflows
All checks were successful
CI — Common Platform / Build, Test & Typecheck (push) Successful in 1m29s

This commit is contained in:
root 2026-05-25 06:02:05 +00:00
parent aea57e1376
commit 9b884d6e85
2 changed files with 27 additions and 60 deletions

View File

@ -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

View File

@ -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