Skip to content

Commit 9824463

Browse files
authored
Fix File Not Found Error - Github Actions (#416)
* Fix File Not Found Error #413 * Remove Schedule as requested by @leotrs * Remove trailing space * Add check for moved files * Check for .py and not py Because it checks for `.npy` files also https://github.com/ManimCommunity/manim/pull/402/checks?check_run_id=1075539216#step:6:560
1 parent 95ff9f8 commit 9824463

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/black-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
$commitEndpoint=$($payload.pull_request._links.commits.href)
3535
echo "$commitEndpoint"
3636
$commits = Invoke-WebRequest -Uri "$commitEndpoint" | ConvertFrom-Json
37-
bash -c "git diff --name-only HEAD HEAD~$($commits.count)>/d/changes.txt"
37+
bash -c "git diff --name-only HEAD~$($commits.count) HEAD>/d/changes.txt"
3838
3939
- name: Run Black on top of latest commit
4040
shell: bash
@@ -45,14 +45,14 @@ jobs:
4545
content=$(</d/changes.txt)
4646
while read file
4747
do
48-
if [ $(python -c "print('${file}'[-2:])") == "py" ]
48+
if [[ ($(python -c "print('${file}'[-3:])") == ".py") && (-f ${file}) ]]
4949
then
5050
black --diff $file
5151
fi
5252
done </d/changes.txt
5353
while read file
5454
do
55-
if [ $(python -c "print('${file}'[-2:])") == "py" ]
55+
if [[ ($(python -c "print('${file}'[-3:])") == ".py") && (-f ${file}) ]]
5656
then
5757
black $file
5858
fi

.github/workflows/black.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: black
22
on:
33
workflow_dispatch:
4-
schedule:
5-
- cron: "0 0 * * *"
64

75
jobs:
86
format:

0 commit comments

Comments
 (0)