The Gitea runner's cache service is unreachable, causing a ~4 minute ETIMEDOUT on every run before falling back to a cold install anyway. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
branches: [dev, main]
|
|
|
|
env:
|
|
IMAGE: ${{ vars.REGISTRY_HOST }}/${{ gitea.repository_owner }}/catalyst
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 'lts/*'
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm test
|
|
|
|
build-dev:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Log in to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY_HOST }}
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.TOKEN }}
|
|
|
|
- name: Compute short SHA
|
|
run: echo "SHORT_SHA=${GITEA_SHA::7}" >> $GITEA_ENV
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
build-args: BUILD_VERSION=dev-${{ env.SHORT_SHA }}
|
|
tags: |
|
|
${{ env.IMAGE }}:dev
|
|
${{ env.IMAGE }}:dev-${{ gitea.sha }}
|