Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ jobs:
steps:
- name: Check for any changed workflows
id: check-for-changed-workflows
uses: tj-actions/changed-files@v41
with:
files: |
.github/workflows/**.yml
run: |
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')
if [[ -n "$CHANGED_WORKFLOWS" ]]; then
echo "any_changed=true" >> $GITHUB_OUTPUT
else
echo "any_changed=false" >> $GITHUB_OUTPUT
fi
- name: Validate workflows
if: steps.check-for-changed-workflows.outputs.any_changed == 'true'
uses: dsanders11/json-schema-validate-action
Expand Down
Loading