Skip to content

Commit 3dac4ec

Browse files
committed
ci: add flake.lock and update release workflow to maintain it
Add flake.lock to the repository to enable `nix run github:unhappychoice/gitlogue` to work correctly. Without the lock file, Nix fails when attempting to update the lock file in a read-only environment. Modified the release workflow to run `nix flake lock` during the update-flake-hashes job, ensuring the lock file stays in sync with flake.nix hash updates on each release.
1 parent eebf770 commit 3dac4ec

2 files changed

Lines changed: 69 additions & 2 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,15 @@ jobs:
232232
echo "Warning: Could not determine cargo hash"
233233
fi
234234
235-
# Commit and push the updated flake.nix
235+
- name: Update flake.lock
236+
run: nix flake lock
237+
238+
- name: Commit and push changes
239+
run: |
240+
VERSION=${{ needs.release.outputs.new_version }}
236241
git config --local user.email "[email protected]"
237242
git config --local user.name "GitHub Action"
238-
git add flake.nix
243+
git add flake.nix flake.lock
239244
git commit -m "chore: update flake.nix hashes for $VERSION" || echo "No changes to commit"
240245
git push origin main
241246

‎flake.lock‎

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)