generated from parchlinux/parch-iso-template
-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (79 loc) · 3.44 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# This workflow will build an Arch Linux ISO file with the commit on it
name: build parchiso per release
on:
release:
types:
- created
env:
api_key: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.event.repository.name }}
release_name: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
HOST: mirror.parchlinux.com
jobs:
build-beta:
if: github.event.release.prerelease == true
permissions:
contents: write
runs-on: ubuntu-latest
container:
image: archlinux:latest
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Install Packages via Pacman
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub github-cli reflector p7zip openssh sshpass rsync wget
- name: Change mirrors
run: reflector --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
- name: Build image
run: mkarchiso -v iso/
- name: remove last iso
run: sshpass -p "${{ secrets.SSH_PASS }}" ssh -o StrictHostKeyChecking=no root@$HOST rm -rf /srv/http/gnome/
- name: remove last iso
run: sshpass -p "${{ secrets.SSH_PASS }}" ssh -o StrictHostKeyChecking=no root@$HOST mkdir /srv/http/gnome/
- name: rename iso
run: mv "$(ls out/*.iso)" out/Parchlinux-Gnome-beta.iso
- name: upload iso to host
run: sshpass -p "${{ secrets.SSH_PASS }}" rsync -r "$(ls out/*.iso)" [email protected]:/srv/http/gnome/
- name: Upload iso to the release
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 }}
build:
if: github.event.release.prerelease == false
permissions:
contents: write
runs-on: ubuntu-latest
container:
image: archlinux:latest
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Install Packages via Pacman
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub github-cli reflector p7zip openssh sshpass rsync wget.
- name: Change mirrors
run: reflector --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
- name: Build image
run: mkarchiso -v iso/
- name: remove last iso
run: sshpass -p "${{ secrets.SSH_PASS }}" ssh -o StrictHostKeyChecking=no root@$HOST rm -rf /srv/http/gnome/
- name: remove last iso
run: sshpass -p "${{ secrets.SSH_PASS }}" ssh -o StrictHostKeyChecking=no root@$HOST mkdir /srv/http/gnome/
- name: rename iso
run: mv "$(ls out/*.iso)" out/Parchlinux-Gnome-latest.iso
- name: upload iso to host
run: sshpass -p "${{ secrets.SSH_PASS }}" rsync -r "$(ls out/*.iso)" [email protected]:/srv/http/gnome/
- name: Upload iso to the release
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 }}