Skip to content

Commit

Permalink
Remove checks for file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
yogyagamage committed Oct 10, 2024
1 parent 81ae850 commit e73f17e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,24 @@ jobs:
python scripts/eval.py
- name: Upload no_links.txt
if: success() && (steps.check-readmes.outputs.no_links != '')
uses: actions/upload-artifact@v3
with:
name: no_links
path: no_links.txt

- name: Upload no_actions.txt
if: success() && (steps.check-readmes.outputs.no_actions != '')
uses: actions/upload-artifact@v3
with:
name: no_actions
path: no_actions.txt

- name: Upload successful.txt
if: success() && (steps.check-readmes.outputs.successful != '')
uses: actions/upload-artifact@v3
with:
name: successful
path: successful.txt

- name: Upload unsuccessful.txt
if: success() && (steps.check-readmes.outputs.unsuccessful != '')
uses: actions/upload-artifact@v3
with:
name: unsuccessful
Expand Down
5 changes: 5 additions & 0 deletions scripts/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ def write_link_to_file(file_path, link):

# Main function to check all READMEs in the directories
def check_readmes(base_dir):
# Create empty result files
open(no_links_file, 'w').close()
open(no_actions_file, 'w').close()
open(successful_file, 'w').close()
open(unsuccessful_file, 'w').close()
for root, dirs, files in os.walk(base_dir):
for file_name in files:
if file_name.lower() == 'readme.md':
Expand Down

0 comments on commit e73f17e

Please sign in to comment.