Skip to content

Commit 72a6dbf

Browse files
committed
Add checks for when there are no files to commit. Also fix a bug with auto-commit-action in workflow
1 parent 33b0722 commit 72a6dbf

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/scripts/icomoon_upload.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ def main():
3737

3838
args = parser.parse_args()
3939

40+
new_icons = filehandler.find_new_icons(args.devicon_json_path, args.icomoon_json_path)
41+
if len(new_icons) == 0:
42+
print("No files need to be uploaded. Ending script...")
43+
return
44+
4045
runner = SeleniumRunner(args.icomoon_json_path, args.download_path,
4146
args.geckodriver_path, args.headless)
4247
runner.upload_icomoon()
4348

44-
new_icons = filehandler.find_new_icons(args.devicon_json_path, args.icomoon_json_path)
4549
svgs = filehandler.get_svgs_paths(new_icons, args.icons_folder_path)
4650
runner.upload_svgs(svgs)
4751

.github/workflows/build_icons.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ jobs:
2323
uses: stefanzweifel/git-auto-commit-action@v4
2424
with:
2525
commit_message: Built new icons, icomoon.json and devicon.css
26+
branch: build-integrate

0 commit comments

Comments
 (0)