diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1389ae4..e163074 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,8 +4,8 @@ on: push: branches: - main - - master - pull_request: + pull_request_review: + workflow_dispatch: permissions: @@ -15,6 +15,7 @@ jobs: flake-check: name: Flake Check runs-on: [self-hosted, nix-builder] + needs: [format-check] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -59,8 +60,8 @@ jobs: nix eval .#nixosConfigurations.${{ matrix.config }}.config.system.build.toplevel.drvPath \ --show-trace - build-artifacts: - name: Build Artifacts + eval-artifacts: + name: Evaluate Artifacts runs-on: [self-hosted, nix-builder] needs: [flake-check, format-check] strategy: @@ -73,18 +74,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Build artifact + - name: Evaluate artifact run: | - echo "Building artifact ${{ matrix.artifact }}" - nix build .#${{ matrix.artifact }} \ - --print-build-logs \ + echo "Evaluating artifact ${{ matrix.artifact }}" + nix eval .#${{ matrix.artifact }}.drvPath \ --show-trace - - - name: Show build result - run: | - if [ -L result ]; then - ls -lh result/ - if [ -d result/iso ]; then - ls -lh result/iso/ - fi - fi diff --git a/inventory.nix b/inventory.nix index b63d78e..3dbdf6c 100644 --- a/inventory.nix +++ b/inventory.nix @@ -108,10 +108,13 @@ url = "https://git.factory.uga.edu"; # Token file must be created manually at this path with a Gitea runner token # Generate in repository settings: Settings > Actions > Runners > Create new Runner - # echo "YOUR_TOKEN_HERE" | sudo tee /var/lib/gitea-runner-token > /dev/null + # echo "TOKEN=YOUR_TOKEN_HERE" | sudo tee /var/lib/gitea-runner-token > /dev/null tokenFile = "/var/lib/gitea-runner-token"; # Labels to identify this runner in workflows - extraLabels = [ "nix-builder" ]; + extraLabels = [ + "self-hosted" + "nix-builder" + ]; # Runner service name name = "athenix"; }; diff --git a/sw/builders/services.nix b/sw/builders/services.nix index 9e8a785..1eebba2 100644 --- a/sw/builders/services.nix +++ b/sw/builders/services.nix @@ -31,6 +31,11 @@ mkIf builderCfg.giteaRunner.enable { # Give the service more time to stop cleanly TimeoutStopSec = mkForce 60; + # Add Node.js and other tools to PATH for GitHub Actions compatibility + Environment = [ + "PATH=${pkgs.nodejs}/bin:${pkgs.bash}/bin:${pkgs.coreutils}/bin:${pkgs.git}/bin:${pkgs.nix}/bin:/run/current-system/sw/bin" + ]; + # Disable all namespace isolation features that don't work in LXC containers PrivateMounts = mkForce false; MountAPIVFS = mkForce false;