Workflow file for this run
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 test flake outputs | ||
on: | ||
push: | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
description: Branch name to build on | ||
default: "" | ||
required: false | ||
type: string | ||
secrets: | ||
CACHIX_ACTIVATE_TOKEN: | ||
CACHIX_AUTH_TOKEN: | ||
required: true | ||
jobs: | ||
nix: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
system: | ||
- aarch64 | ||
- x86_64 | ||
nix-command: | ||
- fmt -- --check | ||
- eval .#apps.$_system.nixos-shell.program | ||
- eval .#apps.$_system.setup.program | ||
runs-on: ${{ matrix.system == "x86_64" && "ubuntu-latest" || "self-hosted" }} | ||
Check failure on line 30 in .github/workflows/ci.yml GitHub Actions / Build and test flake outputsInvalid workflow file
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.branch }} | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
continue-on-error: true | ||
with: | ||
tool-cache: true | ||
- name: Install nix | ||
uses: cachix/install-nix-action@v25 | ||
with: | ||
extra_nix_config: | | ||
keep-going = true | ||
- name: Setup cachix | ||
uses: cachix/cachix-action@v14 | ||
with: | ||
name: gerschtli | ||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | ||
- name: Build command | ||
env: | ||
_system: ${{ matrix.system }}-linux | ||
run: nix ${{ matrix.nix-command }} | ||
- name: Deploy cachix-agent spec | ||
if: github.ref == 'refs/heads/master' && inputs.branch == '' && matrix.deploy-agent | ||
env: | ||
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }} | ||
run: | | ||
echo "::group::Build spec" | ||
spec="$(nix build --print-out-paths ".#cachix-deploy-spec-${{ matrix.deploy-agent }}")" | ||
echo "::group::Upload spec" | ||
cachix push gerschtli "$spec" | ||
echo "::group::Activate deployment" | ||
cachix deploy activate --agent "${{ matrix.deploy-agent }}" ${{ matrix.deploy-args }} "$spec" | ||
# vim: set sw=2: |