Skip to content

Commit b3cbdec

Browse files
authored
Merge pull request #177 from meta-flutter/fix/build-matrix-scheduled
Fix build-matrix calculation
2 parents f1427c9 + 290f15b commit b3cbdec

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/actions/build-matrix/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff 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
@@ -73,7 +82,7 @@ runs:
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+)_/);

0 commit comments

Comments
 (0)