ci: update-flake: use one atomic commit and parallelize updates (#2039)

Link: https://github.com/nix-community/stylix/pull/2039

Reviewed-by: 0xda157 <da157@voidq.com>
This commit is contained in:
0xda157 2025-11-29 11:13:24 -10:00 committed by GitHub
commit 49d56ea397
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,30 +57,23 @@ jobs:
- name: update lock files
run: |
nix flake update \
--commit-lock-file \
--option commit-lock-file-summary "flake: update public inputs"
nix flake update &
nix flake update --flake ./flake/dev &
nix flake update \
--commit-lock-file \
--flake ./flake/dev \
--option commit-lock-file-summary "flake: update dev inputs"
wait
git add {,flake/dev/}flake.lock
# The nixpkgs maintainers may have changed, so keep all-maintainers
# in sync
if nix run .#all-maintainers; then
git add generated/all-maintainers.nix
if
! git commit --message "stylix: update all-maintainers list"
then
echo "::debug::generated/all-maintainers.nix has no changes"
fi
else
echo "::error::failed to update generated/all-maintainers.nix"
fi
git commit --message "flake: update all inputs"
- name: create pull request
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}