Skip to content

Commit

Permalink
ci: update the git diff command in the prevent deletion workflow to i…
Browse files Browse the repository at this point in the history
…mprove accuracy (#2417) (#2421)
  • Loading branch information
ti-chi-bot authored Jul 17, 2023
1 parent d15d184 commit 361cee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/prevent-deletion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Find changes
run: |
git rev-parse '${{ github.event.pull_request.head.sha }}'
if git diff --name-only --diff-filter 'D' HEAD '${{ github.event.pull_request.head.sha }}' | grep -E '^media/.*\.(jpg|png|jpeg|gif)$' >/tmp/changed_files; then
if git diff --merge-base --name-only --diff-filter 'D' HEAD '${{ github.event.pull_request.head.sha }}' | grep -E '^media/.*\.(jpg|png|jpeg|gif)$' >/tmp/changed_files; then
cat /tmp/changed_files
echo '{"name":"Image Deletion Check","head_sha":"${{ github.event.pull_request.head.sha }}","status":"completed","conclusion":"failure"}' > /tmp/body.json
jq \
Expand Down

0 comments on commit 361cee2

Please sign in to comment.