diff options
| author | Nikolai Nechaev <Nikolay_Nechaev@mail.ru> | 2025-09-21 22:07:41 +0900 |
|---|---|---|
| committer | Mihai Fufezan <mihai@fufexan.net> | 2025-09-22 12:30:39 +0300 |
| commit | 22c8bc9b9b59aecfbdb595bb228a0176ce02f810 (patch) | |
| tree | d9ffadcae2e20cd0e2e3fb218777dbcc7418af05 /.github | |
| parent | 26cbc67385d95ba621fe0a125a5b121ffdd09335 (diff) | |
CI/Nix: Allow running CI in forks
Rather than hardcoding the repository name in the workflow file,
use a context value. This allows running workflows in forks.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/nix-ci.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/nix-test.yml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index 1c52d0ab..ae615057 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -13,7 +13,7 @@ jobs: uses: ./.github/workflows/nix.yml secrets: inherit with: - command: nix build 'github:hyprwm/Hyprland?ref=${{ github.ref }}' -L --extra-substituters "https://hyprland.cachix.org" + 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) @@ -21,7 +21,7 @@ jobs: uses: ./.github/workflows/nix.yml secrets: inherit with: - command: nix build 'github:hyprwm/Hyprland?ref=${{ github.ref }}#xdg-desktop-portal-hyprland' -L --extra-substituters "https://hyprland.cachix.org" + command: nix build 'github:${{ github.repository }}?ref=${{ github.ref }}#xdg-desktop-portal-hyprland' -L --extra-substituters "https://hyprland.cachix.org" test: if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork) diff --git a/.github/workflows/nix-test.yml b/.github/workflows/nix-test.yml index a4e32b56..086f0077 100644 --- a/.github/workflows/nix-test.yml +++ b/.github/workflows/nix-test.yml @@ -46,7 +46,7 @@ jobs: authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: Run test VM - run: nix build 'github:hyprwm/Hyprland?ref=${{ github.ref }}#checks.x86_64-linux.tests' -L --extra-substituters "https://hyprland.cachix.org" + run: nix build 'github:${{ github.repository }}?ref=${{ github.ref }}#checks.x86_64-linux.tests' -L --extra-substituters "https://hyprland.cachix.org" - name: Check exit status run: grep 0 result/exit_status |
