Build and Release ISO Images #29
This file contains 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: Build and Release ISO Images | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 3 1,15 * *" # Run on the 1st and 15th of every month at 3:00 AM | |
jobs: | |
build-isos: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize Space | |
uses: easimon/maximize-build-space@v10 | |
with: | |
overprovision-lvm: true | |
remove-android: true | |
remove-dotnet: true | |
remove-codeql: true | |
remove-haskell: true | |
remove-docker-images: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
- name: Setup SSH Agent | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_PRIVATE_GIT }}" >> ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 | |
cat <<EOF > ~/.ssh/config | |
Host * | |
StrictHostKeyChecking no | |
EOF | |
- name: Install Lix | |
uses: DeterminateSystems/nix-installer-action@main | |
with: | |
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux | |
logger: pretty | |
diagnostic-endpoint: "" | |
- name: Nix Magic Cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Build Lilith Iso | |
continue-on-error: false | |
run: nix build -L .#nixosConfigurations.lilith.config.system.build.isoImage | |
- name: Upload Release Artifacts | |
run: | | |
release=$(date +"%Y-%m-%d") | |
gh release create "$release" | |
gh release upload "$release" ./result/iso/*.iso | |
env: | |
GH_TOKEN: ${{ github.token }} |