File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2424 env :
2525 GH_TOKEN : ${{ steps.app-token.outputs.token }}
2626 run : |
27- BRANCHES=$(gh api repos/NixOS/nixpkgs/branches --paginate | grep -o '"name": "nixos-[0-9][0-9]\.[0-9][0-9]"' | grep -o '[0-9][0-9]\.[0-9][0-9]')
28- LATEST_VERSION=$(echo "$BRANCHES" | sort -V | tail -1)
27+ LATEST_VERSION=$(
28+ gh api repos/NixOS/nixpkgs/branches --paginate |
29+ jq -r '.[] | select(.name | test("^nixos-[0-9]{2}\\.[0-9]{2}$")) | .name' |
30+ sort -V |
31+ tail -1
32+ )
2933 if [ -z "$LATEST_VERSION" ]; then
3034 echo "Failed to retrieve latest NixOS version from GitHub"
3135 exit 1
3943 - name : Update NixOS version
4044 run : |
4145 NEW_VERSION="${{ steps.find-version.outputs.version }}"
42- sed -i "s/nixos-[0-9][0-9]\.[0-9][0-9]/nixos- ${NEW_VERSION}/g" flake.nix .github/workflows/build.yml
46+ sed -i "s/nixos-[0-9][0-9]\.[0-9][0-9]/${NEW_VERSION}/g" flake.nix .github/workflows/build.yml
4347 nix flake update
4448
4549 - name : Create Pull Request
You can’t perform that action at this time.
0 commit comments