From cca73fd7412b8cddd4aff496082bf22d7d08ebab Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" <83735213+CosmicFusion@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:12:21 +0300 Subject: [PATCH] initial commit --- .github/workflows/release.yml | 46 +++++++++++++++++++ main.sh | 12 +++++ pika-apx-configs/debian/changelog | 5 ++ pika-apx-configs/debian/compat | 1 + pika-apx-configs/debian/control | 15 ++++++ pika-apx-configs/debian/rules | 4 ++ .../package-managers}/apk.yaml | 0 .../package-managers}/apt.yaml | 0 .../package-managers}/dnf.yaml | 0 .../package-managers}/pacman.yaml | 0 .../package-managers}/swupd.yaml | 0 .../package-managers}/xbps.yaml | 0 .../package-managers}/zypper.yaml | 0 .../stacks}/alpine.yaml | 0 {stacks => pika-apx-configs/stacks}/arch.yaml | 0 .../stacks}/debian-dev.yaml | 0 .../stacks}/debian.yaml | 0 .../stacks}/fedora-dev.yaml | 0 .../stacks}/fedora.yaml | 0 .../stacks}/opensuse.yaml | 0 {stacks => pika-apx-configs/stacks}/pika.yaml | 0 .../stacks}/ubuntu-dev.yaml | 0 .../stacks}/ubuntu.yaml | 0 .../stacks}/vanilla-dev.yaml | 0 .../stacks}/vanilla.yaml | 0 {stacks => pika-apx-configs/stacks}/void.yaml | 0 release.sh | 11 +++++ 27 files changed, 94 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 main.sh create mode 100644 pika-apx-configs/debian/changelog create mode 100644 pika-apx-configs/debian/compat create mode 100644 pika-apx-configs/debian/control create mode 100644 pika-apx-configs/debian/rules rename {package-managers => pika-apx-configs/package-managers}/apk.yaml (100%) rename {package-managers => pika-apx-configs/package-managers}/apt.yaml (100%) rename {package-managers => pika-apx-configs/package-managers}/dnf.yaml (100%) rename {package-managers => pika-apx-configs/package-managers}/pacman.yaml (100%) rename {package-managers => pika-apx-configs/package-managers}/swupd.yaml (100%) rename {package-managers => pika-apx-configs/package-managers}/xbps.yaml (100%) rename {package-managers => pika-apx-configs/package-managers}/zypper.yaml (100%) rename {stacks => pika-apx-configs/stacks}/alpine.yaml (100%) rename {stacks => pika-apx-configs/stacks}/arch.yaml (100%) rename {stacks => pika-apx-configs/stacks}/debian-dev.yaml (100%) rename {stacks => pika-apx-configs/stacks}/debian.yaml (100%) rename {stacks => pika-apx-configs/stacks}/fedora-dev.yaml (100%) rename {stacks => pika-apx-configs/stacks}/fedora.yaml (100%) rename {stacks => pika-apx-configs/stacks}/opensuse.yaml (100%) rename {stacks => pika-apx-configs/stacks}/pika.yaml (100%) rename {stacks => pika-apx-configs/stacks}/ubuntu-dev.yaml (100%) rename {stacks => pika-apx-configs/stacks}/ubuntu.yaml (100%) rename {stacks => pika-apx-configs/stacks}/vanilla-dev.yaml (100%) rename {stacks => pika-apx-configs/stacks}/vanilla.yaml (100%) rename {stacks => pika-apx-configs/stacks}/void.yaml (100%) create mode 100644 release.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0e309aa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: PikaOS Package Release + +on: + workflow_dispatch + +jobs: + build: + runs-on: self-hosted + container: + image: ghcr.io/pikaos-linux/pika-package-container:latest + volumes: + - /proc:/proc + options: --privileged -it + + steps: + - uses: actions/checkout@v3 + + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v5 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Build Package + run: ./main.sh + + - name: Release Package + run: ./release.sh + + - name: Purge cache + uses: jakejarvis/cloudflare-purge-action@master + env: + # Zone is required by both authentication methods + CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} + + CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} + PURGE_URLS: '["https://ppa.pika-os.com/dists/lunar/InRelease", "https://ppa.pika-os.com/dists/lunar/main/binary-i386/Packages.gz", "https://ppa.pika-os.com/dists/lunar/main/binary-amd64/Packages.gz", "https://ppa.pikaos.com/dists/lunar/pika-sources.deb", "https://ppa.pika-os.com/dists/lunar/main/source/Sources.gz" ]' diff --git a/main.sh b/main.sh new file mode 100644 index 0000000..f0d19c7 --- /dev/null +++ b/main.sh @@ -0,0 +1,12 @@ +cd ./pika-apx-configs + +# Get build deps +apt-get build-dep ./ -y + +# Build package +dpkg-buildpackage --no-sign + +# Move the debs to output +cd ../ +mkdir -p ./output +mv ./*.deb ./output/ diff --git a/pika-apx-configs/debian/changelog b/pika-apx-configs/debian/changelog new file mode 100644 index 0000000..63251c2 --- /dev/null +++ b/pika-apx-configs/debian/changelog @@ -0,0 +1,5 @@ +pika-apx-configs (1.0-99pika1-lunar) lunar; urgency=critical + + * initial release + + -- Ward Nakchbandi Sat, 10 Dec 2022 13:48:00 +0300 \ No newline at end of file diff --git a/pika-apx-configs/debian/compat b/pika-apx-configs/debian/compat new file mode 100644 index 0000000..f11c82a --- /dev/null +++ b/pika-apx-configs/debian/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/pika-apx-configs/debian/control b/pika-apx-configs/debian/control new file mode 100644 index 0000000..50bf377 --- /dev/null +++ b/pika-apx-configs/debian/control @@ -0,0 +1,15 @@ +Source: pika-apx-configs +Section: devel +Priority: extra +Maintainer: Mirko Brombin +Uploaders: Mirko Brombin +Build-Depends: debhelper (>= 9), +Standards-Version: 3.9.6 + +Package: pika-apx-configs +Architecture: all +Depends: ${shlibs:Depends}, + ${misc:Depends}, + apx +Built-Using: ${misc:Built-Using} +Description: Pika default stacks for Apx. \ No newline at end of file diff --git a/pika-apx-configs/debian/rules b/pika-apx-configs/debian/rules new file mode 100644 index 0000000..ed7f152 --- /dev/null +++ b/pika-apx-configs/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ \ No newline at end of file diff --git a/package-managers/apk.yaml b/pika-apx-configs/package-managers/apk.yaml similarity index 100% rename from package-managers/apk.yaml rename to pika-apx-configs/package-managers/apk.yaml diff --git a/package-managers/apt.yaml b/pika-apx-configs/package-managers/apt.yaml similarity index 100% rename from package-managers/apt.yaml rename to pika-apx-configs/package-managers/apt.yaml diff --git a/package-managers/dnf.yaml b/pika-apx-configs/package-managers/dnf.yaml similarity index 100% rename from package-managers/dnf.yaml rename to pika-apx-configs/package-managers/dnf.yaml diff --git a/package-managers/pacman.yaml b/pika-apx-configs/package-managers/pacman.yaml similarity index 100% rename from package-managers/pacman.yaml rename to pika-apx-configs/package-managers/pacman.yaml diff --git a/package-managers/swupd.yaml b/pika-apx-configs/package-managers/swupd.yaml similarity index 100% rename from package-managers/swupd.yaml rename to pika-apx-configs/package-managers/swupd.yaml diff --git a/package-managers/xbps.yaml b/pika-apx-configs/package-managers/xbps.yaml similarity index 100% rename from package-managers/xbps.yaml rename to pika-apx-configs/package-managers/xbps.yaml diff --git a/package-managers/zypper.yaml b/pika-apx-configs/package-managers/zypper.yaml similarity index 100% rename from package-managers/zypper.yaml rename to pika-apx-configs/package-managers/zypper.yaml diff --git a/stacks/alpine.yaml b/pika-apx-configs/stacks/alpine.yaml similarity index 100% rename from stacks/alpine.yaml rename to pika-apx-configs/stacks/alpine.yaml diff --git a/stacks/arch.yaml b/pika-apx-configs/stacks/arch.yaml similarity index 100% rename from stacks/arch.yaml rename to pika-apx-configs/stacks/arch.yaml diff --git a/stacks/debian-dev.yaml b/pika-apx-configs/stacks/debian-dev.yaml similarity index 100% rename from stacks/debian-dev.yaml rename to pika-apx-configs/stacks/debian-dev.yaml diff --git a/stacks/debian.yaml b/pika-apx-configs/stacks/debian.yaml similarity index 100% rename from stacks/debian.yaml rename to pika-apx-configs/stacks/debian.yaml diff --git a/stacks/fedora-dev.yaml b/pika-apx-configs/stacks/fedora-dev.yaml similarity index 100% rename from stacks/fedora-dev.yaml rename to pika-apx-configs/stacks/fedora-dev.yaml diff --git a/stacks/fedora.yaml b/pika-apx-configs/stacks/fedora.yaml similarity index 100% rename from stacks/fedora.yaml rename to pika-apx-configs/stacks/fedora.yaml diff --git a/stacks/opensuse.yaml b/pika-apx-configs/stacks/opensuse.yaml similarity index 100% rename from stacks/opensuse.yaml rename to pika-apx-configs/stacks/opensuse.yaml diff --git a/stacks/pika.yaml b/pika-apx-configs/stacks/pika.yaml similarity index 100% rename from stacks/pika.yaml rename to pika-apx-configs/stacks/pika.yaml diff --git a/stacks/ubuntu-dev.yaml b/pika-apx-configs/stacks/ubuntu-dev.yaml similarity index 100% rename from stacks/ubuntu-dev.yaml rename to pika-apx-configs/stacks/ubuntu-dev.yaml diff --git a/stacks/ubuntu.yaml b/pika-apx-configs/stacks/ubuntu.yaml similarity index 100% rename from stacks/ubuntu.yaml rename to pika-apx-configs/stacks/ubuntu.yaml diff --git a/stacks/vanilla-dev.yaml b/pika-apx-configs/stacks/vanilla-dev.yaml similarity index 100% rename from stacks/vanilla-dev.yaml rename to pika-apx-configs/stacks/vanilla-dev.yaml diff --git a/stacks/vanilla.yaml b/pika-apx-configs/stacks/vanilla.yaml similarity index 100% rename from stacks/vanilla.yaml rename to pika-apx-configs/stacks/vanilla.yaml diff --git a/stacks/void.yaml b/pika-apx-configs/stacks/void.yaml similarity index 100% rename from stacks/void.yaml rename to pika-apx-configs/stacks/void.yaml diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..98eac6c --- /dev/null +++ b/release.sh @@ -0,0 +1,11 @@ +# Sign the packages +dpkg-sig --sign builder ./output/*.deb + +# Pull down existing ppa repo db files etc +rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo + +# Add the new package to the repo +reprepro -V --basedir ./output/repo/ includedeb lunar ./output/*.deb + +# Push the updated ppa repo to the server +rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/