Skip to content

Commit a9b7dd7

Browse files
authored
docs: update README example (#33)
1 parent 06b7d5e commit a9b7dd7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ jobs:
1919
steps:
2020
- name: Check for any changed workflows
2121
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
2629
- name: Validate workflows
2730
if: steps.check-for-changed-workflows.outputs.any_changed == 'true'
2831
uses: dsanders11/json-schema-validate-action

0 commit comments

Comments
 (0)