From 3cf0719ce223503db72aab539c620aa9269b0abf Mon Sep 17 00:00:00 2001 From: Chang Yang Date: Fri, 29 Dec 2023 17:25:33 +0800 Subject: [PATCH] add workflow --- .github/workflows/publish_iso.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/publish_iso.yml diff --git a/.github/workflows/publish_iso.yml b/.github/workflows/publish_iso.yml new file mode 100644 index 0000000..45d1572 --- /dev/null +++ b/.github/workflows/publish_iso.yml @@ -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 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