Skip to content

Commit 19ed513

Browse files
committed
fix: dispatch
1 parent 9693829 commit 19ed513

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

.github/workflows/agentkit-build.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ on:
44
pull_request:
55
types:
66
- closed
7+
workflow_dispatch:
8+
inputs:
9+
base_sha:
10+
description: "Base commit SHA (optional)"
11+
required: false
12+
head_sha:
13+
description: "Head commit SHA (optional)"
14+
required: false
715

816
jobs:
917
agentkit-build:
10-
if: ${{ github.event.pull_request.merged == true }}
18+
if: >
19+
${{ (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch' }}
1120
runs-on: ubuntu-latest
1221

1322
env:
@@ -36,8 +45,8 @@ jobs:
3645
3746
- name: Run main.py in changed use-case directories (build)
3847
env:
39-
BASE_SHA: ${{ github.event.pull_request.base.sha }}
40-
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
48+
BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.inputs.base_sha }}
49+
HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.inputs.head_sha }}
4150
AGENTKIT_COMMAND: build
4251
run: |
4352
python -m workflow_utils.check_usecases

.github/workflows/agentkit-check.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ name: agentkit-check
22

33
on:
44
pull_request:
5+
workflow_dispatch:
6+
inputs:
7+
base_sha:
8+
description: "Base commit SHA (optional)"
9+
required: false
10+
head_sha:
11+
description: "Head commit SHA (optional)"
12+
required: false
513

614
jobs:
715
agentkit-launch:
@@ -33,7 +41,7 @@ jobs:
3341
3442
- name: Run main.py in changed use-case directories
3543
env:
36-
BASE_SHA: ${{ github.event.pull_request.base.sha }}
37-
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
44+
BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.inputs.base_sha }}
45+
HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.inputs.head_sha }}
3846
run: |
3947
python -m workflow_utils.check_usecases

0 commit comments

Comments
 (0)