Compare commits
3 commits
2023-06-13
...
main
Author | SHA1 | Date | |
---|---|---|---|
665d916d3b | |||
fae5a3735a | |||
be3334fd6f |
5 changed files with 29 additions and 19 deletions
15
.github/workflows/build.yaml
vendored
15
.github/workflows/build.yaml
vendored
|
@ -9,8 +9,11 @@ env:
|
|||
api_key: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: ${{ github.event.repository.name }}
|
||||
release_name: ${{ github.ref_name }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux:latest
|
||||
|
@ -18,11 +21,17 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Packages via Pacman
|
||||
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub reflector
|
||||
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub github-cli reflector p7zip
|
||||
- name: Change Arch docker mirror
|
||||
run: reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
|
||||
- name: Build image
|
||||
run: mkarchiso -v iso/
|
||||
- name: Upload iso to the release
|
||||
run: python tools/upload_asset.py
|
||||
|
||||
run: |
|
||||
cd ./out
|
||||
mkdir iso_parts
|
||||
# split -d -b 2000M "$(ls *.iso)" iso_parts/"$(ls *.iso)"_part
|
||||
#zip -s 2000m iso_parts/"$(ls *.iso)".zip "$(ls *.iso)"
|
||||
7z -v1000m a iso_parts/"$(ls *.iso)".zip "$(ls *.iso)"
|
||||
md5sum iso_parts/* > iso_parts/md5sums.txt
|
||||
gh release upload ${{ github.event.release.tag_name }} ./iso_parts/* -R ${{ github.repository }}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
timeout 15
|
||||
default 01-archiso-x86_64-linux.conf
|
||||
beep on
|
||||
beep off
|
||||
|
|
|
@ -120,6 +120,7 @@ vim
|
|||
virtualbox-guest-utils-nox
|
||||
vpnc
|
||||
which
|
||||
boost
|
||||
wireless-regdb
|
||||
wireless_tools
|
||||
wpa_supplicant
|
||||
|
@ -141,7 +142,6 @@ sddm
|
|||
|
||||
#Desktop
|
||||
parch-dwm-dots
|
||||
dmscripts-git
|
||||
dmenu
|
||||
kitty
|
||||
volumeicon
|
||||
|
@ -154,7 +154,7 @@ hsetroot
|
|||
lxqt-policykit
|
||||
dunst
|
||||
parch-dwm-config
|
||||
pcmanfm
|
||||
thunar
|
||||
awesome-terminal-fonts
|
||||
ttf-font-awesome
|
||||
hack-nerd-fonts
|
||||
|
@ -166,7 +166,8 @@ nordzy-cursors
|
|||
ranger
|
||||
atril
|
||||
mpv
|
||||
clementine
|
||||
parch-mpv
|
||||
amberol
|
||||
fira-code-mono
|
||||
fira-code-font
|
||||
|
||||
|
@ -175,7 +176,6 @@ btop
|
|||
xdg-user-dirs
|
||||
packagekit-qt5
|
||||
neofetch-git
|
||||
ttf-ms-fonts
|
||||
parch-firefox-config
|
||||
vazirmatn-fonts
|
||||
ttf-joypixels
|
||||
|
@ -183,7 +183,7 @@ parch-wm-calamares
|
|||
|
||||
#parchlinuxstuff
|
||||
calamares
|
||||
parchlinux-cala-config
|
||||
calamares-parch
|
||||
os-prober
|
||||
paru
|
||||
parch-branding
|
||||
|
@ -192,3 +192,4 @@ parch-os-wallpapers
|
|||
parch-emoji-ios
|
||||
bash-completion
|
||||
iranian-fonts
|
||||
parch-grub
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 470 KiB After Width: | Height: | Size: 181 KiB |
|
@ -9,7 +9,7 @@ from github import Github
|
|||
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
|
||||
|
||||
api_key = os.getenv("api_key", None)
|
||||
api_key = os.getenv("API_KEY", None)
|
||||
current_date = datetime.today().strftime("%Y-%m-%d")
|
||||
|
||||
|
||||
|
@ -28,29 +28,29 @@ file_name = _path.name
|
|||
|
||||
hash = _compute_sha256(path)
|
||||
|
||||
repo_name = os.getenv("name", None)
|
||||
release_name = os.getenv("release_name", None)
|
||||
repo_name = os.getenv("REPO_NAME", None)
|
||||
release_name = os.getenv("RELEASE_NAME", None)
|
||||
|
||||
logging.info("Starting at %s", current_date)
|
||||
|
||||
if not (repo_name and api_key and release_name):
|
||||
logging.error(
|
||||
"'repo_name'/'api_key'/'release_name' not found in your envs."
|
||||
"please add this and run again"
|
||||
"'REPO_NAME'/'API_KEY'/'RELEASE_NAME' not found in your environment vars."
|
||||
"please add this and run again."
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
gh = Github(api_key)
|
||||
print(repo_name, api_key)
|
||||
repo = gh.get_repo(f"parchlinux/{repo_name}")
|
||||
repo = gh.get_repo(repo_name)
|
||||
|
||||
release = repo.get_release(release_name)
|
||||
|
||||
logging.info("statrting Upload ISO to release")
|
||||
logging.info("Statrting upload ISO to release")
|
||||
|
||||
release.upload_asset(path=path)
|
||||
logging.info("ISO upload is done")
|
||||
logging.info("ISO uploaded.")
|
||||
|
||||
# update release
|
||||
msg = (
|
||||
|
@ -60,6 +60,6 @@ msg = (
|
|||
| :---: | :---: |
|
||||
| {file_name} | {hash} |"""
|
||||
)
|
||||
logging.info("Starting Update release msg with: \n %s" % msg)
|
||||
logging.info("Starting update release msg with: \n %s" % msg)
|
||||
release.update_release(name=release.tag_name, message=msg)
|
||||
logging.info("Release Update is done.")
|
||||
logging.info("Release update is done.")
|
||||
|
|
Loading…
Add table
Reference in a new issue