Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sly-Harvey authored Apr 17, 2024
1 parent 478500b commit f7e07a8
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: NixOS
concurrency: nixos

on:
workflow_dispatch:
pull_request:
push:
branches:
- testing
paths-ignore:
- "README.md"
- ".gitignore"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Create Dir for Mounting Disk Space"
run: |
sudo mkdir /nix
- name: "Remove unneeded components"
run: |
sudo rm -rf $AGENT_TOOLSDIRECTORY
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/lib/heroku
sudo rm -rf /var/lib/docker/overlay2
sudo rm -rf /home/linuxbrew
sudo rm -rf /home/runner/.rustup
- name: "Maximize Disk Space"
uses: easimon/maximize-build-space@v10
with:
#root-reserve-mb: 8192
swap-size-mb: 1024
build-mount-path: /nix
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"

- uses: actions/checkout@v3

- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v14
with:
name: workflow-nixos-config
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: "Build NixOS config ❄️"
run: |
nix build .#nixosConfigurations.nixos.config.system.build.toplevel

0 comments on commit f7e07a8

Please sign in to comment.