nix-evaluator-stats/.github/workflows/nix.yml
dependabot[bot] 2dda235aa6
build(deps): bump cachix/install-nix-action from 31.9.0 to 31.10.4
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.9.0 to 31.10.4.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](https://github.com/cachix/install-nix-action/compare/v31.9.0...v31.10.4)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.10.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-16 16:17:51 +00:00

66 lines
1.9 KiB
YAML

name: Fix pnpm dependency hash
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
fix-nix-hash:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: "Get changed files"
id: changed-files
uses: dorny/paths-filter@v4
with:
filters: |
files:
- 'flake.nix'
- 'package.json'
- 'pnpm-lock.yaml'
# Exit early if no relevant files are updated
- name: Install Nix
uses: cachix/install-nix-action@v31.10.4
if: steps.changed-files.outputs.files == 'true'
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
substituters = https://cache.nixos.org/ https://feel-co.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= feel-co.cachix.org-1:nwEFNnwZvtl4KKSH5LDg+/+K7bV0vcs6faMHAJ6xx0w=
- name: Update Dependency Hash
if: steps.changed-files.outputs.files == 'true'
run: |
if nix build --print-build-logs .# 2> /tmp/log; then
exit 0
fi
hash="$(grep 'got:' /tmp/log | awk '{print $2}')"
if [ -n "$hash" ]; then
echo "hash=$hash"
echo "Updating hash in package.nix"
sed -e "s#hash =.*\$#hash = \"$hash\";#g" -i nix/package.nix
else
echo "No hash found, exiting"
exit 0 # exit with success, this is not error worthy
fi
git diff
- name: Update dependencies
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "meta: auto-update dependencies"