Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fix File Not Found Error - Github Actions (#416)

Naveen M K982446375f0b
diff --git a/.github/workflows/black-pr.yml b/.github/workflows/black-pr.yml
index 3de710016..fb98f2656 100644
--- a/.github/workflows/black-pr.yml
+++ b/.github/workflows/black-pr.yml
@@ -34,7 +34,7 @@ jobs:
$commitEndpoint=$($payload.pull_request._links.commits.href)
echo "$commitEndpoint"
$commits = Invoke-WebRequest -Uri "$commitEndpoint" | ConvertFrom-Json
- bash -c "git diff --name-only HEAD HEAD~$($commits.count)>/d/changes.txt"
+ bash -c "git diff --name-only HEAD~$($commits.count) HEAD>/d/changes.txt"
- name: Run Black on top of latest commit
shell: bash
@@ -45,14 +45,14 @@ jobs:
content=$(</d/changes.txt)
while read file
do
- if [ $(python -c "print('${file}'[-2:])") == "py" ]
+ if [[ ($(python -c "print('${file}'[-3:])") == ".py") && (-f ${file}) ]]
then
black --diff $file
fi
done </d/changes.txt
while read file
do
- if [ $(python -c "print('${file}'[-2:])") == "py" ]
+ if [[ ($(python -c "print('${file}'[-3:])") == ".py") && (-f ${file}) ]]
then
black $file
fi
diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml
index cc15e6fed..e13f9c25b 100644
--- a/.github/workflows/black.yml
+++ b/.github/workflows/black.yml
@@ -1,8 +1,6 @@
name: black
on:
workflow_dispatch:
- schedule:
- - cron: "0 0 * * *"
jobs:
format: