Skip to content

Build ISO

Build ISO #35

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build ISO
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
schedule:
- cron: "0 2 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Use GitHub cache for Nix
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Show disk size
run: |
df -h
lscpu
sudo rm -rf /opt/hostedtoolcache
sudo docker system prune -af; sudo docker volume prune -f; sudo docker builder prune --all -f
docker system prune -af; docker volume prune -f; docker builder prune --all -f
npm cache clean --force
sudo npm cache clean --force
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local
df -h
- name: Update flake.lock
run: nix flake update
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "Actions"
git commit -a -m "update flake.lock"
# Runs a single command using the runners shell
- name: Build ISO
run: nix build .#nixosConfigurations.iso.config.system.build.isoImage
- name: Upload ISO
uses: actions/upload-artifact@v4
with:
name: NixOS ISO
path: result/iso
if-no-files-found: error
retention-days: 5
# Runs a set of commands using the runners shell
#- name: Run a multi-line script
# run: |
# echo Add other actions to build,
# echo test, and deploy your project.