DeterminateSystems / update-flake-lock

Automatically refresh your Nix Flakes.
MIT License
244 stars 30 forks source link

Unrecognized flag error --commit-lockfile-summary #120

Closed sakshatshinde closed 4 months ago

sakshatshinde commented 4 months ago

I was trying out the first given example

name: update-flake-lock
on:
  workflow_dispatch: # allows manual triggering
  schedule:
    - cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

jobs:
  lockfile:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Install Nix
        uses: DeterminateSystems/nix-installer-action@main
      - name: Update flake.lock
        uses: DeterminateSystems/update-flake-lock@main
        with:
          pr-title: "Update flake.lock" # Title of PR to be created
          pr-labels: |                  # Labels to be set on the PR
            dependencies
            automated

Workflow fails with below error

Run DeterminateSystems/update-flake-lock@main
Run echo "GIT_AUTHOR_NAME=github-actions[bot]" >> $GITHUB_ENV
Run node "$GITHUB_ACTION_PATH/dist/index.js"
/nix/var/nix/profiles/default/bin/nix flake update --commit-lock-file --commit-lockfile-summary flake.lock: Update
error: unrecognised flag '--commit-lockfile-summary'
Try '/nix/var/nix/profiles/default/bin/nix --help' for more information.
Error: Error: The process '/nix/var/nix/profiles/default/bin/nix' failed with exit code 1
Error: Process completed with exit code 1.
sodiboo commented 4 months ago

I'm experiencing this same issue. It started happening in my repo 18 hours ago, and i've been getting several failed runs since then. Here's a link to the first failed run. It doesn't consistently happen, though. For example, this run just now worked fine.

cole-h commented 4 months ago

Thanks for the reports, it seems like this reared its head in the recent update to Nix 2.23.1 that we're rolling out. For now, we've halted the rollout, and things should start working again.

cole-h commented 4 months ago

I released https://github.com/DeterminateSystems/update-flake-lock/releases/tag/v23 earlier which contains the fix for this issue, as we continue rolling out the new version of nix-installer. Thank you for your patience and the report!