File tree Expand file tree Collapse file tree
.github/actions/build-matrix Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,12 +55,21 @@ runs:
5555 uses : tj-actions/changed-files@v45
5656 with :
5757 files : configs/toolchain-llvm*.json
58+
59+ - name : Get workflow path
60+ id : workflow-path
61+ shell : bash
62+ run : |
63+ # github.workflow_ref = "owner/repo/.github/workflows/file.yml@refs/..."
64+ path=$(echo "${{ github.workflow_ref }}" | sed 's|[^/]*/[^/]*/||; s|@.*||')
65+ echo "Workflow path: $path"
66+ echo "path=$path" >> $GITHUB_OUTPUT
5867
5968 - name : Check if workflow itself changed
6069 id : workflow-changed
6170 uses : tj-actions/changed-files@v45
6271 with :
63- files : .github/workflows/ubuntu-legacy.yml
72+ files : ${{ steps.workflow-path.outputs.path }}
6473
6574 - name : Merge changed versions with defaults
6675 id : merge
7382 const changedFiles = '${{ steps.changed-files.outputs.all_changed_files }}';
7483 const changedVersions = [];
7584
76- if (changedFiles) {
85+ if (changedFiles && context.eventName === 'pull_request' ) {
7786 const files = changedFiles.split(' ');
7887 for (const file of files) {
7988 const match = file.match(/toolchain-llvm(\d+)_/);
You can’t perform that action at this time.
0 commit comments