File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,13 @@ jobs:
19
19
steps :
20
20
- name : Check for any changed workflows
21
21
id : check-for-changed-workflows
22
- uses : tj-actions/changed-files@v41
23
- with :
24
- files : |
25
- .github/workflows/**.yml
22
+ run : |
23
+ CHANGED_WORKFLOWS=$(gh api repos/${{ github.event.pull_request.base.repo.full_name }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[] | select((.filename | match("^.github/workflows/.*.yml$")) and (.status != "removed")) | .filename')
24
+ if [[ -n "$CHANGED_WORKFLOWS" ]]; then
25
+ echo "any_changed=true" >> $GITHUB_OUTPUT
26
+ else
27
+ echo "any_changed=false" >> $GITHUB_OUTPUT
28
+ fi
26
29
- name : Validate workflows
27
30
if : steps.check-for-changed-workflows.outputs.any_changed == 'true'
28
31
uses : dsanders11/json-schema-validate-action
You can’t perform that action at this time.
0 commit comments