Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ci: test that a SHA-256 mismatch aborts the install
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
Fumesover and claude committed Nov 21, 2026
commit a7bc07bff241dda491476cd64104318d61552869
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,38 @@ jobs:
oldest_installer_version: ${{ matrix.oldest_installer_version }}
oldest_installer_sha256: ${{ matrix.oldest_installer_sha256 }}

# The action must refuse to run an installer that doesn't match install_sha256
install-sha256-mismatch:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest]
install_url:
# Default installer
- ""
# Custom installer
- https://releases.nixos.org/nix/nix-2.18.6/install
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Nix
id: install-nix
continue-on-error: true
uses: ./
with:
install_url: ${{ matrix.install_url }}
install_sha256: "0000000000000000000000000000000000000000000000000000000000000000"
- name: Check that the install failed
run: |
if [[ "${{ steps.install-nix.outcome }}" != "failure" ]]; then
echo "Expected the install to fail on a SHA-256 mismatch, got: ${{ steps.install-nix.outcome }}" >&2
exit 1
fi
if command -v nix >/dev/null 2>&1 || [[ -e /nix/var/nix ]]; then
echo "Nix was installed despite the SHA-256 mismatch" >&2
exit 1
fi

act-support:
runs-on: ubuntu-latest
steps:
Expand Down