Added workflow to update Red Hat Container Catalog

This commit is contained in:
Alexey Pustovalov 2024-02-20 15:53:14 +09:00
parent 6137c2ae81
commit 25fa398e91

View File

@ -7,13 +7,13 @@ import os
repository_description = None
if ("DESCRIPTION_FILE" not in os.environ or len(os.environ["DESCRIPTION_FILE"]) == 0):
print("Description file environment variable is not specified")
print("::error::Description file environment variable is not specified")
sys.exit(1)
if ("PYXIS_API_TOKEN" not in os.environ or len(os.environ["PYXIS_API_TOKEN"]) == 0):
print("API token environment variable is not specified")
print("::error::API token environment variable is not specified")
sys.exit(1)
if ("API_URL" not in os.environ or len(os.environ["API_URL"]) == 0):
print("API URL environment variable is not specified")
print("::error::API URL environment variable is not specified")
sys.exit(1)
if ("PROJECT_ID" not in os.environ or len(os.environ["PROJECT_ID"]) == 0):
print("RedHat project ID environment variable is not specified")
@ -30,7 +30,7 @@ elif (os.path.isfile(os.environ["DESCRIPTION_FILE"] + '.html')):
file.close()
if (repository_description is None or len(repository_description) == 0):
print("No description")
print("::error::No description file found")
sys.exit(1)
data = dict()