File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 66 paths :
77 - " data/tools/**.yml"
88 - " ci/**"
9+ workflow_dispatch :
10+ inputs :
11+ pr_number :
12+ description : " PR number to check"
13+ required : true
14+ tool_files :
15+ description : " Space-separated list of tool YAML files to check (e.g. data/tools/foo.yml)"
16+ required : true
917
1018jobs :
1119 pr-check :
2129 - name : Get changed tool files
2230 id : changed
2331 run : |
24- FILES=$(git diff --name-only --diff-filter=A origin/master...HEAD -- 'data/tools/*.yml' | tr '\n' ' ')
32+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
33+ FILES="${{ inputs.tool_files }}"
34+ else
35+ FILES=$(git diff --name-only --diff-filter=A origin/master...HEAD -- 'data/tools/*.yml' | tr '\n' ' ')
36+ fi
2537 echo "files=$FILES" >> "$GITHUB_OUTPUT"
2638
2739 - name : Install Rust toolchain
4557 env :
4658 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4759 GITHUB_REPOSITORY : ${{ github.repository }}
48- PR_NUMBER : ${{ github.event.pull_request.number }}
60+ PR_NUMBER : ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number || github. event.pull_request.number }}
4961 run : |
5062 ci/target/release/pr-check ${{ steps.changed.outputs.files }}
You can’t perform that action at this time.
0 commit comments