init push
test release
This commit is contained in:
parent
ae0c8b0344
commit
9d3277c65b
6 changed files with 50 additions and 31 deletions
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
|
@ -1,13 +1,14 @@
|
|||
# This workflow will build an Arch Linux ISO file with the commit on it
|
||||
name: Build Arch ISO with ArchInstall Commit
|
||||
name: build parchiso per release
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
env:
|
||||
api_key: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: ${{ github.event.repository.name }}
|
||||
release_name: ${{ github.event.release.name }}
|
||||
release_name: ${{ github.ref_name }}
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -15,10 +16,6 @@ jobs:
|
|||
image: archlinux:latest
|
||||
options: --privileged
|
||||
steps:
|
||||
- uses: crazy-max/ghaction-import-gpg@v4
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Packages via Pacman
|
||||
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pip
|
||||
|
@ -27,4 +24,5 @@ jobs:
|
|||
- name: Build image
|
||||
run: mkarchiso -v iso/
|
||||
- name: Upload iso to the release
|
||||
run: python tools/upload_assest.py
|
||||
run: python tools/upload_asset.py
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Autologin]
|
||||
Relogin=false
|
||||
User=liveuser
|
||||
Session=plasma
|
||||
Session=lxqt
|
||||
|
||||
[Theme]
|
||||
Current=breeze-dark
|
||||
Current=
|
||||
|
|
|
@ -80,7 +80,6 @@ nmap
|
|||
ntfs-3g
|
||||
nvme-cli
|
||||
open-iscsi
|
||||
open-vm-tools
|
||||
openconnect
|
||||
openssh
|
||||
openvpn
|
||||
|
@ -94,9 +93,7 @@ pv
|
|||
python
|
||||
python-psutil
|
||||
python-systemd
|
||||
qemu-guest-agent
|
||||
refind
|
||||
#reflector
|
||||
reiserfsprogs
|
||||
rp-pppoe
|
||||
rsync
|
||||
|
@ -138,6 +135,10 @@ openssl-1.1
|
|||
openssl
|
||||
|
||||
#Desktop
|
||||
lxqt
|
||||
engrampa
|
||||
unzip
|
||||
unrar
|
||||
|
||||
#systemutils
|
||||
btop
|
||||
|
@ -145,8 +146,8 @@ xdg-user-dirs
|
|||
packagekit-qt5
|
||||
neofetch
|
||||
keepassxc
|
||||
octopi-git
|
||||
|
||||
vazirmatn-fonts
|
||||
hack-nerd-fonts
|
||||
|
||||
#parchlinuxstuff
|
||||
calamares
|
||||
|
@ -155,3 +156,5 @@ os-prober
|
|||
paru
|
||||
parch-branding
|
||||
parch-pacman
|
||||
parch-emoji-ios
|
||||
|
||||
|
|
|
@ -95,11 +95,8 @@ Include = /etc/pacman.d/mirrorlist
|
|||
|
||||
[ppr]
|
||||
SigLevel = Optional TrustedOnly
|
||||
Server = https://parchlinux.github.io/ppr/$arch
|
||||
Server = https://raw.githubusercontent.com/parchlinux/ppr/main/x86_64/
|
||||
|
||||
[pcp]
|
||||
SigLevel = Optional TrustedOnly
|
||||
Server = https://parchlinux.github.io/pcp/$arch
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
iso_name="Parchlinux"
|
||||
iso_label="PARCH_$(date +%Y%m)"
|
||||
iso_name="Parchlinux LXQT"
|
||||
iso_label="Parchlinux_lxqt_$(date +%Y%m)"
|
||||
iso_publisher="Parch Linux <https://github.com/parch-os/>"
|
||||
iso_application="Parch Linux Live/Rescue CD"
|
||||
#gpg_key="BC9DCC3C9A0B047F53065EEBFB8554F927F96E60"
|
||||
#gpg_signer="KomeilParseh <ahmdparsh129@gmail.com>"
|
||||
iso_version="$(date +%Y.%m.%d)"
|
||||
install_dir="arch"
|
||||
buildmodes=('iso')
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from glob import glob
|
||||
from pathlib import Path
|
||||
|
||||
from github import Github
|
||||
|
||||
|
@ -10,9 +11,23 @@ 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
|
||||
|
||||
|
||||
def _compute_sha256(file_name):
|
||||
hash_sha256 = hashlib.sha256()
|
||||
with open(file_name, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(4096), b""):
|
||||
hash_sha256.update(chunk)
|
||||
return hash_sha256.hexdigest()
|
||||
|
||||
|
||||
_path = list(Path().cwd().glob("out/*.iso"))[0]
|
||||
path = _path.as_posix()
|
||||
|
||||
file_name = _path.name
|
||||
|
||||
hash = _compute_sha256(path)
|
||||
|
||||
repo_name = os.getenv("name", None)
|
||||
release_name = os.getenv("release_name", None)
|
||||
|
||||
|
@ -27,7 +42,8 @@ if not (repo_name and api_key and release_name):
|
|||
|
||||
|
||||
gh = Github(api_key)
|
||||
repo = gh.get_repo(f"parch-os/{repo_name}")
|
||||
print(repo_name, api_key)
|
||||
repo = gh.get_repo(f"parchlinux/{repo_name}")
|
||||
|
||||
release = repo.get_release(release_name)
|
||||
|
||||
|
@ -36,7 +52,14 @@ 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
|
||||
# update release
|
||||
msg = (
|
||||
release.body
|
||||
+ f"""
|
||||
| name | sha256 |
|
||||
| :---: | :---: |
|
||||
| {file_name} | {hash} |"""
|
||||
)
|
||||
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.")
|
Loading…
Add table
Reference in a new issue