mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 19:11:03 +08:00
ci: guard Kilo-only workflows in forks (#11210)
* ci: guard Kilo-only workflows in forks * ci: trim fork workflow guards --------- Co-authored-by: CI Bot <ci@beads.test>
This commit is contained in:
@@ -26,15 +26,18 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
call-valtown:
|
||||
# kilocode_change start
|
||||
if: >
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(
|
||||
github.repository == 'Kilo-Org/kilocode' &&
|
||||
github.event.pull_request.merged == true &&
|
||||
(
|
||||
startsWith(github.event.pull_request.title, 'feat:') ||
|
||||
startsWith(github.event.pull_request.title, 'feat(')
|
||||
)
|
||||
)
|
||||
# kilocode_change end
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
|
||||
@@ -18,7 +18,7 @@ on:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404 # kilocode_change
|
||||
outputs:
|
||||
is-member: ${{ steps.check.outputs['is-member'] }}
|
||||
steps:
|
||||
|
||||
@@ -19,6 +19,7 @@ on:
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (java-kotlin)
|
||||
if: github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
|
||||
@@ -24,6 +24,7 @@ on:
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
if: github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode'
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
|
||||
@@ -16,6 +16,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode' # kilocode_change
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
# kilocode_change start
|
||||
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
Remember: post at most ONE comment combining all findings. If everything is fine, post nothing."
|
||||
|
||||
recheck-compliance:
|
||||
if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'needs:compliance')
|
||||
if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'needs:compliance') # kilocode_change
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build docs site
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404 # kilocode_change
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6 # kilocode_change
|
||||
|
||||
@@ -258,7 +258,7 @@ jobs:
|
||||
name: Validate CLI (windows-${{ matrix.arch }})
|
||||
needs: build-cli
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 20 # kilocode_change
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@@ -21,7 +21,7 @@ on:
|
||||
jobs:
|
||||
unit:
|
||||
name: unit tests
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404 # kilocode_change
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
unit:
|
||||
name: ${{ !matrix.settings.run && 'unit (unchanged)' || matrix.settings.total > 1 && format('unit ({0}, {1}/{2})', matrix.settings.os, matrix.settings.index, matrix.settings.total) || format('unit ({0})', matrix.settings.os) }}
|
||||
needs: changes
|
||||
strategy:
|
||||
strategy: # kilocode_change
|
||||
fail-fast: false
|
||||
matrix:
|
||||
settings: ${{ fromJSON(needs.changes.outputs.settings) }}
|
||||
@@ -236,7 +236,7 @@ jobs:
|
||||
- jetbrains
|
||||
if: always()
|
||||
steps:
|
||||
- name: Verify upstream test jobs passed
|
||||
- name: Verify upstream test jobs passed # kilocode_change
|
||||
run: |
|
||||
echo "unit=${{ needs.unit.result }}"
|
||||
echo "httpapi=${{ needs.httpapi.result }}"
|
||||
|
||||
@@ -10,7 +10,7 @@ on:
|
||||
jobs:
|
||||
typecheck-js:
|
||||
name: typecheck-js
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404 # kilocode_change
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6 # kilocode_change
|
||||
|
||||
@@ -12,7 +12,7 @@ permissions:
|
||||
jobs:
|
||||
check-paths:
|
||||
name: Check changed paths
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest # kilocode_change
|
||||
outputs:
|
||||
matched: ${{ steps.filter.outputs.matched }}
|
||||
can_autocommit: ${{ steps.autocommit-check.outputs.can_autocommit }}
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
visual-regression:
|
||||
needs: check-paths
|
||||
if: needs.check-paths.outputs.matched == 'true'
|
||||
name: Visual Regression (kilo-ui)
|
||||
name: Visual Regression (kilo-ui) # kilocode_change
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -220,7 +220,7 @@ jobs:
|
||||
visual-regression-vscode:
|
||||
needs: check-paths
|
||||
if: needs.check-paths.outputs.matched == 'true'
|
||||
name: Visual Regression (kilo-vscode webview)
|
||||
name: Visual Regression (kilo-vscode webview) # kilocode_change
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
|
||||
@@ -12,7 +12,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
check-release:
|
||||
if: github.repository == 'Kilo-Org/kilocode' && vars.OPENCODE_WATCH_ENABLED != 'false'
|
||||
if: vars.OPENCODE_WATCH_ENABLED != 'false' && (github.event_name == 'workflow_dispatch' || github.repository == 'Kilo-Org/kilocode') # kilocode_change
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user