starting the build
This commit is contained in:
parent
b62d36f756
commit
a60f9444eb
1 changed files with 5 additions and 11 deletions
|
@ -2,17 +2,16 @@ import logging
|
|||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from glob import glob
|
||||
|
||||
from pathlib import Path
|
||||
from github import Github
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
|
||||
|
||||
api_key = os.getenv("api_key", None)
|
||||
current_date = datetime.today().strftime("%Y-%m-%d")
|
||||
path = glob(r"/__w/parch-iso-template/parch-iso-template/out/*.iso")[
|
||||
0
|
||||
] # edit this if your not use in workflow
|
||||
|
||||
path = list(Path().cwd().glob("out/*.iso"))[0].as_posix()
|
||||
|
||||
repo_name = os.getenv("name", None)
|
||||
release_name = os.getenv("release_name", None)
|
||||
|
||||
|
@ -27,7 +26,7 @@ if not (repo_name and api_key and release_name):
|
|||
|
||||
|
||||
gh = Github(api_key)
|
||||
repo = gh.get_repo(f"parch-os/{repo_name}")
|
||||
repo = gh.get_repo(f"parchlinux/{repo_name}")
|
||||
|
||||
release = repo.get_release(release_name)
|
||||
|
||||
|
@ -35,8 +34,3 @@ logging.info("statrting Upload ISO to release")
|
|||
|
||||
release.upload_asset(path=path)
|
||||
logging.info("ISO upload is done")
|
||||
|
||||
logging.info("statrting Upload ISO gpg key to release")
|
||||
release.upload_asset(
|
||||
"/__w/parch-iso-template/parch-iso-template/iso/public.key"
|
||||
) # noqa: E501:w
|
||||
|
|
Loading…
Add table
Reference in a new issue