ci(wf-01): Gitea-first trusted candidate gating [skip ci]
Gitea CI #107 terminal 7/7 PASS at 89ba8a70; exact 4 file scope, security review and dedicated runners verified. No production changes.
This commit was merged in pull request #11.
This commit is contained in:
1 parent
d9d1c2f4b2
commit
1e2cd31aef
4 files changed
+69
-8
No files matched your search
@@ -4,6 +4,13 @@ on:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.gitea/workflows/datastack-ci.yml'
|
||||
# Base-owned PR workflow; never run fork-controlled code on self-hosted runners.
|
||||
pull_request_target:
|
||||
branches: [main]
|
||||
types: [opened, reopened, synchronize]
|
||||
paths-ignore:
|
||||
- 'notes/**'
|
||||
- '**/*.md'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
p01_only:
|
||||
@@ -22,15 +29,21 @@ on:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
# CI needs repository read only; it never publishes artifacts or edits remotes.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
node-regression:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true') }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true')) }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: Install dependencies
|
||||
run: npm ci --no-audit --no-fund
|
||||
- name: Build Node SDK
|
||||
@@ -55,7 +68,7 @@ jobs:
|
||||
test "$failed" -eq 0
|
||||
|
||||
python-regression:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true') }}
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-bookworm-slim
|
||||
timeout-minutes: 20
|
||||
@@ -68,6 +81,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: CI-06 Python 3.11 isolated virtual environment
|
||||
run: |
|
||||
set -eu
|
||||
@@ -86,13 +101,15 @@ jobs:
|
||||
echo DATASTACK_PYTHON_14_OF_14_PASS
|
||||
|
||||
quality:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true' }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: Install dependencies
|
||||
run: npm ci --no-audit --no-fund
|
||||
- name: TypeScript type check
|
||||
@@ -101,13 +118,15 @@ jobs:
|
||||
run: npm run lint
|
||||
|
||||
production-build:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true') }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true')) }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: Install dependencies
|
||||
run: npm ci --no-audit --no-fund
|
||||
- name: Next.js production build
|
||||
@@ -117,7 +136,7 @@ jobs:
|
||||
test -f .next/standalone/server.js
|
||||
|
||||
docker-image-build:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true') }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true')) }}
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-alpine
|
||||
timeout-minutes: 45
|
||||
@@ -132,6 +151,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: CI-07 inspect daemon and validate Compose without starting services
|
||||
run: |
|
||||
set -eu
|
||||
@@ -155,13 +176,15 @@ jobs:
|
||||
echo DATASTACK_THREE_IMAGES_BUILD_PASS
|
||||
|
||||
windows-compatibility:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true') }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true')) }}
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: Verify native Windows toolchain
|
||||
shell: powershell
|
||||
run: |
|
||||
@@ -183,7 +206,7 @@ jobs:
|
||||
if ($LASTEXITCODE -ne 0) { throw 'SDK compilation failed' }
|
||||
|
||||
security-audit:
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true') }}
|
||||
if: ${{ (github.event_name != 'pull_request_target' || (github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main')) && (github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.python_only != 'true')) }}
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-alpine
|
||||
timeout-minutes: 15
|
||||
@@ -193,6 +216,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: CI-08 read-only full and runtime npm advisory inventory
|
||||
run: |
|
||||
set -eu
|
||||
@@ -230,4 +255,4 @@ jobs:
|
||||
}
|
||||
NODE
|
||||
git diff --exit-code -- package.json package-lock.json
|
||||
echo DATASTACK_SECURITY_TRIAGE_INVENTORY_PASS
|
||||
echo DATASTACK_SECURITY_TRIAGE_INVENTORY_PASS
|
||||
Reference in new issue
Block a user