Skip to content

Enhance workflow: Add disk space expansion and Pacman cache managemen… #10

Enhance workflow: Add disk space expansion and Pacman cache managemen…

Enhance workflow: Add disk space expansion and Pacman cache managemen… #10

Workflow file for this run

name: Build SunnyOS with GNOME ISO
on:
push:
branches:
- sunnyos_gnome
pull_request:
branches:
- sunnyos_gnome
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: List repository files for debugging
run: |
ls -R $GITHUB_WORKSPACE
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Increase Available Disk Space
run: |
mkdir -p /tmp/temp && sudo mount -t tmpfs -o size=10G tmpfs /tmp/temp
- name: Restore Pacman cache
uses: actions/cache@v3
with:
path: /var/cache/pacman/pkg
key: pacman-cache-${{ runner.os }}-${{ hashFiles('**/profile') }}
restore-keys: |
pacman-cache-${{ runner.os }}
- name: Build SunnyOS ISO
run: |
docker run --rm --privileged \
-v "$GITHUB_WORKSPACE:/work" \
-v "/tmp/temp:/tmp" \
archlinux:latest /bin/bash -c "
pacman -Sy --noconfirm archiso &&
mkarchiso -v -w /tmp/work -o /tmp/out /work/profile
"
- name: Upload ISO artifact
uses: actions/upload-artifact@v3
with:
name: sunnyos-iso
path: /tmp/temp/out/*.iso
- name: Save Pacman cache
uses: actions/cache@v3
with:
path: /var/cache/pacman/pkg
key: pacman-cache-${{ runner.os }}-${{ hashFiles('**/profile') }}