Skip to content

Commit 6d5082d

Browse files
committed
fix(workflow): trying to replace compromised tj-actions
1 parent 8128d54 commit 6d5082d

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/on-markdown-update.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff 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'

0 commit comments

Comments
 (0)