ci: improve the automated nix bump title and commit message
Some checks failed
install-nix-action test / simple-build (ubuntu-latest) (push) Failing after 51s
install-nix-action test / custom-nix-path (ubuntu-latest) (push) Failing after 15s
install-nix-action test / extra-nix-config (ubuntu-latest) (push) Failing after 3s
install-nix-action test / flakes (ubuntu-latest) (push) Failing after 3s
install-nix-action test / latest-installer (ubuntu-latest, x86_64-linux) (push) Failing after 14s
install-nix-action test / oldest-supported-installer (ubuntu-latest) (push) Failing after 13s
install-nix-action test / act-support (ubuntu-latest) (push) Failing after 13s
install-nix-action test / simple-build (macos-13) (push) Has been cancelled
install-nix-action test / simple-build (macos-latest) (push) Has been cancelled
install-nix-action test / simple-build (ubuntu-24.04-arm) (push) Has been cancelled
install-nix-action test / custom-nix-path (macos-13) (push) Has been cancelled
install-nix-action test / custom-nix-path (macos-latest) (push) Has been cancelled
install-nix-action test / custom-nix-path (ubuntu-24.04-arm) (push) Has been cancelled
install-nix-action test / extra-nix-config (macos-13) (push) Has been cancelled
install-nix-action test / extra-nix-config (macos-latest) (push) Has been cancelled
install-nix-action test / extra-nix-config (ubuntu-24.04-arm) (push) Has been cancelled
install-nix-action test / flakes (macos-13) (push) Has been cancelled
install-nix-action test / flakes (macos-latest) (push) Has been cancelled
install-nix-action test / flakes (ubuntu-24.04-arm) (push) Has been cancelled
install-nix-action test / latest-installer (macos-13, x86_64-darwin) (push) Has been cancelled
install-nix-action test / latest-installer (macos-latest, aarch64-darwin) (push) Has been cancelled
install-nix-action test / latest-installer (ubuntu-24.04-arm, aarch64-linux) (push) Has been cancelled
install-nix-action test / oldest-supported-installer (macos-13) (push) Has been cancelled
install-nix-action test / oldest-supported-installer (macos-latest) (push) Has been cancelled
install-nix-action test / oldest-supported-installer (ubuntu-24.04-arm) (push) Has been cancelled

This commit is contained in:
Sander 2025-06-24 17:59:06 +02:00
parent 607623b76b
commit f0fe604f8a
No known key found for this signature in database
GPG key ID: D1A763BC84F34603

View file

@ -23,9 +23,30 @@ jobs:
echo "Failed to determine latest Nix version." >&2
exit 1
fi
current_nix=$(grep -oE 'nix_version=[0-9.]+' ./install-nix.sh | cut -d= -f2)
echo "Current Nix version: ${current_nix}"
echo "Latest Nix version: ${latest_nix}"
echo "CURRENT_NIX=${current_nix}" >> $GITHUB_ENV
echo "LATEST_NIX=${latest_nix}" >> $GITHUB_ENV
sed -i -E "s/nix_version=[0-9.]+/nix_version=${latest_nix}/" ./install-nix.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: Update nix versions
title: "nix: ${{ env.CURRENT_NIX }} -> ${{ env.LATEST_NIX }}"
commit-message: "nix: ${{ env.CURRENT_NIX }} -> ${{ env.LATEST_NIX }}"
body: |
This PR updates the Nix version from ${{ env.CURRENT_NIX }} to ${{ env.LATEST_NIX }}.
**To trigger the CI:**
1. Checkout the PR branch:
```bash
gh pr checkout <pr-number>
```
2. Amend and force push:
```bash
git commit --amend --no-edit
git push --force-with-lease
```
labels: dependencies