Skip to content

Commit 91654fd

Browse files
committed
Validate files contain at least one byte before uploading
Signed-off-by: Tobias Wolf <wolf@b1-systems.de> On-behalf-of: SAP <tobias.wolf@sap.com>
1 parent 96715cd commit 91654fd

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library
44
inputs:
55
version:
66
description: GardenLinux Python library version
7-
default: "0.10.17"
7+
default: "0.10.18"
88
python_version:
99
description: Python version to setup
1010
default: "3.13"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "gardenlinux"
3-
version = "0.10.17"
3+
version = "0.10.18"
44
description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
55
authors = ["Garden Linux Maintainers <contact@gardenlinux.io>"]
66
license = "Apache-2.0"

src/gardenlinux/github/release/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def upload_to_github_release_page(
7575
)
7676
return
7777

78+
if os.path.getsize(file_to_upload) < 1:
79+
LOGGER.info(f"{file_to_upload} is empty and will be ignored")
80+
return
81+
7882
token = os.environ.get("GITHUB_TOKEN")
7983
if not token:
8084
raise ValueError("GITHUB_TOKEN environment variable not set")
@@ -103,3 +107,10 @@ def upload_to_github_release_page(
103107
f"Upload failed with status code {response.status_code}: {response.text}"
104108
)
105109
response.raise_for_status()
110+
111+
112+
__all__ = [
113+
"create_github_release",
114+
"write_to_release_id_file",
115+
"upload_to_github_release_page",
116+
]

0 commit comments

Comments
 (0)