File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,13 +26,22 @@ jobs:
2626 with :
2727 fetch-depth : 0
2828
29+ - name : Check out PR head for manual runs
30+ if : github.event_name == 'workflow_dispatch'
31+ run : |
32+ PR_REF=$(gh pr view ${{ inputs.pr_number }} --repo ${{ github.repository }} --json headRefName --jq '.headRefName')
33+ git fetch origin "$PR_REF"
34+ git checkout FETCH_HEAD -- ${{ inputs.tool_files }}
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+
2938 - name : Get changed tool files
3039 id : changed
3140 run : |
3241 if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
3342 FILES="${{ inputs.tool_files }}"
3443 else
35- FILES=$(git diff --name-only --diff-filter=A origin/master...HEAD -- 'data/tools/*.yml' | tr '\n' ' ')
44+ FILES=$(git diff --name-only --diff-filter=A origin/master...HEAD -- 'data/tools/*.yml' 'data/tools/*.yaml' | tr '\n' ' ')
3645 fi
3746 echo "files=$FILES" >> "$GITHUB_OUTPUT"
3847
Original file line number Diff line number Diff line change @@ -427,7 +427,11 @@ async fn main() -> Result<()> {
427427 let tool_paths: Vec < PathBuf > = tool_paths
428428 . into_iter ( )
429429 . filter ( |p| {
430- p. starts_with ( "data/tools" ) && p. extension ( ) . and_then ( |e| e. to_str ( ) ) == Some ( "yml" )
430+ p. starts_with ( "data/tools" )
431+ && matches ! (
432+ p. extension( ) . and_then( |e| e. to_str( ) ) ,
433+ Some ( "yml" ) | Some ( "yaml" )
434+ )
431435 } )
432436 . collect ( ) ;
433437
You can’t perform that action at this time.
0 commit comments