Skip to content

Commit 358e729

Browse files
authored
Try getting the input from the event file
1 parent c21a1f7 commit 358e729

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/check_latest_release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@ jobs:
3838
3939
# Extract module name and version from the release tag
4040
# Assuming the tag format is <module_name>-<version>, e.g., nidigital-1.4.0
41+
with open(os.getenv("GITHUB_EVENT_PATH"), "r", encoding="utf-8") as event_file:
42+
event = json.load(event_file)
4143
if os.getenv("GITHUB_EVENT_NAME") == "workflow_dispatch":
42-
tag = os.getenv("INPUT_RELEASE_TAG")
44+
tag = event["inputs"]["release_tag"]
4345
else:
44-
with open(os.getenv("GITHUB_EVENT_PATH"), "r", encoding="utf-8") as event_file:
45-
event = json.load(event_file)
4646
tag = event["release"]["tag_name"]
4747
48-
print(dict(os.environ))
4948
assert tag.count("-") == 1, f"Invalid tag format: {tag}. Expected format: <module_name>-<version>"
5049
module_name, module_version = tag.split("-")
5150
with open(os.getenv("GITHUB_OUTPUT"), "a", encoding="utf-8") as output_file:

0 commit comments

Comments
 (0)