mirror of
https://github.com/NotAShelf/nix-evaluator-stats.git
synced 2026-04-12 06:17:43 +00:00
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3 to 4. - [Release notes](https://github.com/dorny/paths-filter/releases) - [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md) - [Commits](https://github.com/dorny/paths-filter/compare/v3...v4) --- updated-dependencies: - dependency-name: dorny/paths-filter dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
66 lines
1.9 KiB
YAML
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@v5
|
|
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.9.0
|
|
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"
|