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 (#14232) (#14259)
  • Loading branch information
ti-chi-bot authored Jul 17, 2023
1 parent 094115b commit 16079cc
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 16079cc

Please sign in to comment.