Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fetch latest installer from hydra #194

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,24 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@V27

- id: latest_installer
name: Fetch latest installer from Hydra
run: |
build_id=$(curl --header 'Accept: application/json' --location --silent \
https://hydra.nixos.org/job/nix/master/installerScript/latest-finished \
| jq -r '.id')
install_url="https://hydra.nixos.org/build/$build_id/download/1/install"
echo "install_url=$install_url" >> $GITHUB_OUTPUT

- uses: cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://nixos-nix-install-tests.cachix.org/serve/kkq45x7yrzvxq8627fi6hkswnfa7mg2l/install
install_url: ${{ steps.latest_installer.outputs.install_url }}
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'

- run: yarn install --frozen-lockfile
- run: yarn build

- name: Test public cache
uses: ./
with:
Expand Down
Loading