mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-30 20:50:13 +01:00
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.
This commit is contained in:
parent
26cbc67385
commit
22c8bc9b9b
2 changed files with 3 additions and 3 deletions
4
.github/workflows/nix-ci.yml
vendored
4
.github/workflows/nix-ci.yml
vendored
|
|
@ -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)
|
||||
|
|
|
|||
2
.github/workflows/nix-test.yml
vendored
2
.github/workflows/nix-test.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue