|
|
|
name: Build ISO
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.SECRET_TOKEN }}
|
|
|
|
container:
|
|
|
|
image: ghcr.io/crystal-linux/crystal:latest
|
|
|
|
options: --privileged
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
pacman -Syu --needed --noconfirm
|
|
|
|
pacman -S --noconfirm --needed bind
|
|
|
|
nslookup repo.getcryst.al
|
|
|
|
pacman -S git archiso pacman-contrib --needed --noconfirm
|
|
|
|
git clone https://github.com/crystal-linux/iso/
|
|
|
|
cd iso
|
|
|
|
bash build.sh --build-iso
|
|
|
|
md5sum *.iso > MD5SUM-iso
|
|
|
|
rm chrooted.sh
|
|
|
|
bash build.sh --build-bootstrap
|
|
|
|
md5sum *.tar.gz > MD5SUM-rootfs
|
|
|
|
|
|
|
|
|
|
|
|
- name: Get current date
|
|
|
|
id: date
|
|
|
|
run: echo "::set-output name=date::$(env ls -1 *.iso | cut -d'-' -f3,4,5,6,7)"
|
|
|
|
|
|
|
|
- name: Upload
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
artifacts: "iso/*.iso,iso/MD5SUM-iso,iso/*.tar.gz,iso/MD5SUM-rootfs"
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
tag: ${{ steps.date.outputs.date }}
|
|
|
|
|
|
|
|
|