Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
YukariChiba committed Dec 29, 2023
1 parent edcb49e commit 0b42480
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/publish_iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Generate ISO image

on:
schedule:
- cron: '0 0 */3 * *'
workflow_dispatch:

jobs:
geniso:
strategy:
matrix:
arch: [x86_64, aarch64, riscv64]
include:
- arch: x86_64
debarch: amd64
- arch: aarch64
debarch: arm64
- arch: riscv64
debarch: riscv64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ matrix.arch }}
- name: Build ISO for ${{ matrix.arch }}
run: |
docker run \
--rm \
-v $(pwd):/${{ github.workspace }} \
-w ${{ github.workspace }} \
--platform linux/${{ matrix.debarch }} \
docker.io/debian:unstable \
bash -c "apt update && apt install -y wget dosfstools arch-install-scripts sudo pacman-package-manager xorriso arch-install-scripts squashfs-tools systemd-container && ./gen.sh"
- name: Collect result
run: |
mkdir -p result
cp eweos.iso result/eweos-${{ matrix.arch }}-liveimage.iso
sha256sum result/eweos-${{ matrix.arch }}-liveimage.iso > result/eweos-${{ matrix.arch }}-liveimage.iso.sha256
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eweos-${{ matrix.arch }}-liveimage
path: result
2 changes: 1 addition & 1 deletion gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fi

function crsh(){
echo $@
sudo systemd-nspawn -D rootfs bash -c "$@"
sudo arch-chroot rootfs bash -c "$@"
}

sudo rm -r rootfs || true
Expand Down

0 comments on commit 0b42480

Please sign in to comment.