summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMihai Fufezan <mihai@fufexan.net>2026-04-17 16:22:33 +0300
committerMihai Fufezan <mihai@fufexan.net>2026-04-17 16:54:27 +0300
commitf75a14d19e255356543ff4687089a6b9c1f91488 (patch)
tree64cd11ecc72b756dfd72bfef651ae02588ada2de /.github
parentb5ea887f072fa055cf23ec389ed81e3ee4c5319a (diff)
CI/Nix: use org-wide actions
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/nix-ci.yml6
-rw-r--r--.github/workflows/nix-test.yml23
-rw-r--r--.github/workflows/nix-update-inputs.yml18
-rw-r--r--.github/workflows/nix.yml41
4 files changed, 7 insertions, 81 deletions
diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml
index 5b22e992..467b2dfb 100644
--- a/.github/workflows/nix-ci.yml
+++ b/.github/workflows/nix-ci.yml
@@ -10,17 +10,19 @@ jobs:
hyprland:
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork)
- uses: ./.github/workflows/nix.yml
+ uses: hyprwm/actions/.github/workflows/nix.yml@main
secrets: inherit
with:
+ checkout: false
command: nix build 'github:${{ github.repository }}?ref=${{ github.ref }}' -L --extra-substituters "https://hyprland.cachix.org"
xdph:
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork)
needs: hyprland
- uses: ./.github/workflows/nix.yml
+ uses: hyprwm/actions/.github/workflows/nix.yml@main
secrets: inherit
with:
+ checkout: false
command: nix build 'github:${{ github.repository }}?ref=${{ github.ref }}#xdg-desktop-portal-hyprland' -L --extra-substituters "https://hyprland.cachix.org"
test:
diff --git a/.github/workflows/nix-test.yml b/.github/workflows/nix-test.yml
index 68357093..666d971c 100644
--- a/.github/workflows/nix-test.yml
+++ b/.github/workflows/nix-test.yml
@@ -10,28 +10,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Install Nix
- uses: nixbuild/nix-quick-install-action@v31
+ - uses: hyprwm/actions/nix-setup@main
with:
- nix_conf: |
- keep-env-derivations = true
- keep-outputs = true
-
- - name: Restore and save Nix store
- uses: nix-community/cache-nix-action@v6
- with:
- # restore and save a cache using this key (per job)
- primary-key: nix-${{ runner.os }}-${{ github.job }}
- # if there's no cache hit, restore a cache by this prefix
- restore-prefixes-first-match: nix-${{ runner.os }}
- # collect garbage until the Nix store size (in bytes) is at most this number
- # before trying to save a new cache
- gc-max-store-size-linux: 5G
-
- - uses: cachix/cachix-action@v15
- with:
- name: hyprland
- authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
+ CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Run test VM
run: nix build 'github:${{ github.repository }}?ref=${{ github.ref }}#checks.x86_64-linux.tests' -L --extra-substituters "https://hyprland.cachix.org"
diff --git a/.github/workflows/nix-update-inputs.yml b/.github/workflows/nix-update-inputs.yml
index a3084b27..9e92365f 100644
--- a/.github/workflows/nix-update-inputs.yml
+++ b/.github/workflows/nix-update-inputs.yml
@@ -17,23 +17,7 @@ jobs:
with:
token: ${{ secrets.PAT }}
- - name: Install Nix
- uses: nixbuild/nix-quick-install-action@v31
- with:
- nix_conf: |
- keep-env-derivations = true
- keep-outputs = true
-
- - name: Restore and save Nix store
- uses: nix-community/cache-nix-action@v6
- with:
- # restore and save a cache using this key (per job)
- primary-key: nix-${{ runner.os }}-${{ github.job }}
- # if there's no cache hit, restore a cache by this prefix
- restore-prefixes-first-match: nix-${{ runner.os }}
- # collect garbage until the Nix store size (in bytes) is at most this number
- # before trying to save a new cache
- gc-max-store-size-linux: 5G
+ - uses: hyprwm/actions/nix-setup@main
- name: Update inputs
run: nix/update-inputs.sh
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
deleted file mode 100644
index b46b3795..00000000
--- a/.github/workflows/nix.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: Build
-
-on:
- workflow_call:
- inputs:
- command:
- required: true
- type: string
- description: Command to run
- secrets:
- CACHIX_AUTH_TOKEN:
- required: false
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Install Nix
- uses: nixbuild/nix-quick-install-action@v31
- with:
- nix_conf: |
- keep-env-derivations = true
- keep-outputs = true
-
- - name: Restore and save Nix store
- uses: nix-community/cache-nix-action@v6
- with:
- # restore and save a cache using this key (per job)
- primary-key: nix-${{ runner.os }}-${{ github.job }}
- # if there's no cache hit, restore a cache by this prefix
- restore-prefixes-first-match: nix-${{ runner.os }}
- # collect garbage until the Nix store size (in bytes) is at most this number
- # before trying to save a new cache
- gc-max-store-size-linux: 5G
-
- - uses: cachix/cachix-action@v15
- with:
- name: hyprland
- authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
-
- - run: ${{ inputs.command }}