diff --git a/.gitea/workflows/nix-update.yml b/.gitea/workflows/nix-update.yml index a7fb2c9..9f96982 100644 --- a/.gitea/workflows/nix-update.yml +++ b/.gitea/workflows/nix-update.yml @@ -66,8 +66,6 @@ jobs: UPDATES_FOUND=false UPDATED_PACKAGES="" - # List of packages to IGNORE (known incompatible with nix-update) - # These either have complex src attributes or non-standard versioning IGNORE_PACKAGES=( "hyprpaper-random" "launch-webapp" @@ -87,27 +85,28 @@ jobs: local pkg=$1 local before_hash=$(git rev-parse HEAD) - # Check if package is ignored + # IGNORE CHECKS for ignore in "${IGNORE_PACKAGES[@]}"; do if [ "$pkg" = "$ignore" ]; then echo "ℹ️ Skipping $pkg (in ignore list)" return 0 fi done + + # Base args: Flake mode, Commit changes, Use GitHub Releases API + # --use-github-releases ensures we only get "Latest Release" (ignoring pre-releases/random tags) + local args=("--flake" "--commit" "--use-github-releases") - # Build arguments array - local args=("--flake" "--commit") - - # Special handling for opencode + # Special configuration if [ "$pkg" = "opencode" ]; then - echo "ℹ️ Adding --subpackage node_modules for opencode" + echo "ℹ️ Config for opencode: --subpackage node_modules" args+=("--subpackage" "node_modules") fi - - # Add package name + args+=("$pkg") echo "Checking $pkg..." + # We allow failure (exit 0) so one package doesn't crash the whole loop if nix-update "${args[@]}" 2>&1 | tee /tmp/update-${pkg}.log; then if [ "$(check_commit "$before_hash")" = "true" ]; then echo "✓ Updated $pkg" @@ -136,7 +135,6 @@ jobs: if [ -z "$PACKAGES" ]; then echo "No packages found to update" - echo "has_updates=false" >> $GITHUB_OUTPUT exit 0 fi @@ -183,8 +181,6 @@ jobs: echo "Checking for dirty state..." git status --porcelain - - echo "Resetting any unstaged changes (e.g. dirty lockfiles) before rebase..." git reset --hard HEAD echo "Pulling latest changes (rebase)..."