Skip to content

Commit

Permalink
ci: improve pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
terlar committed Nov 19, 2024
1 parent c60639b commit 06082c2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 25 deletions.
60 changes: 36 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ on:
- main
jobs:
changes:
name: Changes
runs-on: ubuntu-latest
outputs:
nixos-configuration: ${{ steps.changes.outputs.nixos-configuration }}
home-configuration: ${{ steps.changes.outputs.home-configuration }}
installer-yubikey: ${{ steps.changes.outputs.installer-yubikey }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Path filters
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
filters: |
Expand All @@ -37,25 +40,28 @@ jobs:
- 'packages/drduh-gpg-conf/**'
- 'packages/drduh-yubikey-guide/**'
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: |
http-connections = 50
max-jobs = auto
diagnostic-endpoint: ''
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
- name: Nix cache (cachix)
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
useDaemon: true
name: terlar
extraPullNames: cuda-maintainers
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Check
- name: Run check
run: nix flake check
build-home-configuration:
name: Build home configuration
needs: changes
if: ${{ needs.changes.outputs.home-configuration == 'true' }}
strategy:
Expand All @@ -65,15 +71,16 @@ jobs:
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: |
http-connections = 50
max-jobs = auto
diagnostic-endpoint: ''
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
- name: Nix cache (cachix)
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
useDaemon: true
name: terlar
Expand All @@ -83,6 +90,7 @@ jobs:
run: |
nix build --print-build-logs .#homeConfigurations.${{ matrix.username }}.activationPackage
build-nixos-configuration:
name: Build NixOS configuration
needs: changes
if: ${{ needs.changes.outputs.nixos-configuration == 'true' }}
strategy:
Expand All @@ -91,16 +99,18 @@ jobs:
- kong
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: |
http-connections = 50
max-jobs = auto
diagnostic-endpoint: ''
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
- name: Nix cache (cachix)
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
useDaemon: true
name: terlar
Expand All @@ -110,6 +120,7 @@ jobs:
run: |
nix build --print-build-logs .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel
build-iso:
name: Build ISO
needs: changes
if: ${{ needs.changes.outputs.installer-yubikey == 'true' }}
strategy:
Expand All @@ -118,15 +129,16 @@ jobs:
- installer-yubikey
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: |
http-connections = 50
max-jobs = auto
diagnostic-endpoint: ''
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
- name: Nix cache (cachix)
uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
useDaemon: true
name: terlar
Expand Down
1 change: 0 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Configuration for NixOS and user home (dot files). It is provided via Nix flakes
- nixosModules :: modules that can be used together with [[https://github.com/NixOS/nixpkgs][NixOS]].
- overlays :: custom overlays.
- default :: package overlay including a subset of packages.
- fromInputs :: composed overlay from all input overlays.
- packages :: packages not in the default nixpkgs.
- drduh-gpg-conf :: GPG config per drduh recommendation.
- drduh-yubikey-guide :: The drduh YubiKey guide readable via the terminal.
Expand Down

0 comments on commit 06082c2

Please sign in to comment.