Generate ISO image #294
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate ISO image | |
| on: | |
| schedule: | |
| - cron: '0 0 */3 * *' | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, reopened] | |
| jobs: | |
| geniso: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x86_64, aarch64, riscv64, loongarch64] | |
| variant: [liveimage-desktop-xfce, liveimage-standard, tarball] | |
| exclude: | |
| - arch: riscv64 | |
| variant: liveimage-desktop-xfce | |
| include: | |
| - arch: x86_64 | |
| debarch: amd64 | |
| runson: ubuntu-24.04 | |
| - arch: aarch64 | |
| debarch: arm64 | |
| runson: ubuntu-24.04-arm | |
| - arch: riscv64 | |
| debarch: riscv64 | |
| runson: ubuntu-24.04 | |
| - arch: loongarch64 | |
| debarch: loong64 | |
| runson: ubuntu-24.04 | |
| runs-on: ${{ matrix.runson }} | |
| name: Generate ISO for ${{ matrix.variant }} - ${{ matrix.arch }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y wget dosfstools arch-install-scripts sudo pacman-package-manager xorriso arch-install-scripts squashfs-tools systemd-container qemu-user-static | |
| sudo systemctl restart systemd-binfmt | |
| - name: Build ISO for ${{ matrix.variant }} - ${{ matrix.arch }} | |
| run: | | |
| ./gen.sh ${{ matrix.variant }} ${{ matrix.arch }} | |
| - name: Check build Results | |
| id: buildresult | |
| run: | | |
| ls results/ | grep -v .sha256 | |
| ls results/ | grep .sha256 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eweos-${{ matrix.arch }}-${{ matrix.variant }} | |
| path: results/ | |
| compression-level: 0 | |
| - name: Install s3cmd | |
| if: github.event_name != 'pull_request' | |
| run: sudo apt -y install s3cmd | |
| - name: Create s3cmd config | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| echo "[default]" >> .s3-cf.conf | |
| echo "access_key = ${{ secrets.CF_IMG_S3_ACCESS_KEY }}" >> .s3-cf.conf | |
| echo "secret_key = ${{ secrets.CF_IMG_S3_SECRET_KEY }}" >> .s3-cf.conf | |
| echo "host_base = ${{ secrets.CF_IMG_S3_HOST }}" >> .s3-cf.conf | |
| echo "host_bucket = ${{ secrets.CF_IMG_S3_HOST_BUCKET }}" >> .s3-cf.conf | |
| echo "bucket_location = auto" >> .s3-cf.conf | |
| echo "enable_multipart = False" >> .s3-cf.conf | |
| echo "[default]" >> .s3-orc.conf | |
| echo "access_key = ${{ secrets.ORC_IMG_S3_ACCESS_KEY }}" >> .s3-orc.conf | |
| echo "secret_key = ${{ secrets.ORC_IMG_S3_SECRET_KEY }}" >> .s3-orc.conf | |
| echo "host_base = ${{ secrets.ORC_IMG_S3_HOST }}" >> .s3-orc.conf | |
| echo "host_bucket = ${{ secrets.ORC_IMG_S3_HOST_BUCKET }}" >> .s3-orc.conf | |
| echo "bucket_location = auto" >> .s3-orc.conf | |
| echo "enable_multipart = False" >> .s3-orc.conf | |
| - name: Upload to Object Storage | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| s3cmd -c ./.s3-orc.conf put results/* s3://eweos-repo/eweos-images/ | |
| s3cmd -c ./.s3-cf.conf put results/* s3://ewe/eweos-images/ | |