parch-iso-mate/.github/workflows/build.yaml

38 lines
1.3 KiB
YAML
Raw Normal View History

2024-03-12 16:42:11 +03:30
# This workflow will build an Arch Linux ISO file with the commit on it
2023-10-02 10:15:27 +03:30
name: build parchiso per release
on:
release:
types:
- created
2024-03-12 16:42:11 +03:30
env:
api_key: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.event.repository.name }}
release_name: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
2023-10-02 10:15:27 +03:30
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
container:
image: archlinux:latest
options: --privileged
steps:
- uses: actions/checkout@v3
- name: Install Packages via Pacman
2024-06-16 13:32:44 +03:30
run: pacman -Sy; pacman --noconfirm -S git archiso python python-pygithub github-cli reflector p7zip zip unzip
2024-03-12 16:42:11 +03:30
- name: Change Arch docker mirror
run: reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
2023-10-02 10:15:27 +03:30
- name: Build image
run: mkarchiso -v iso/
- name: Upload iso to the release
2024-03-12 16:42:11 +03:30
run: |
cd ./out
mkdir iso_parts
# split -d -b 2000M "$(ls *.iso)" iso_parts/"$(ls *.iso)"_part
2024-06-16 13:32:44 +03:30
zip -s 1000m iso_parts/"$(ls *.iso)".zip "$(ls *.iso)"
#7z -v1000m a iso_parts/"$(ls *.iso)".zip "$(ls *.iso)"
2024-03-12 16:42:11 +03:30
md5sum iso_parts/* > iso_parts/md5sums.txt
gh release upload ${{ github.event.release.tag_name }} ./iso_parts/* -R ${{ github.repository }}