File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,20 @@ jobs:
2121 with :
2222 fetch-depth : 0
2323
24- - name : Get all markdown files
24+ - name : Get changed files
2525 id : changed-markdown-files
26- uses : tj-actions/changed-files@v45
27- with :
28- # Avoid using single or double quotes for multiline patterns
29- files : |
30- README.md
26+ # Set outputs using the command.
27+ run : |
28+ git diff --name-only ${{ github.event.before }} ${{ github.event.after }}
29+ git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -c 'README\.md$'
30+ echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep 'README\.md$' | xargs)" >> $GITHUB_OUTPUT
31+
32+ - name : List changed files
33+ run : |
34+ for file in ${{ steps.changed-markdown-files.outputs.changed_files }}; do
35+ echo "$file was changed"
36+ done
37+
3138
3239 - name : Install python3
3340 if : steps.changed-markdown-files.outputs.any_changed == 'true'
You can’t perform that action at this time.
0 commit comments