From 0273cc38132608d7bc7b86efa2ab1f224c1e74d1 Mon Sep 17 00:00:00 2001 From: Julio Caicedo Date: Sun, 15 Feb 2026 00:23:38 -0500 Subject: [PATCH] ci(workflow): fix CHANGELOG sed command for macOS compatibility Replace sed in-place editing with temp file approach to ensure the changelog update script works on both Linux and macOS platforms. The previous sed -i implementation had different syntax requirements between operating systems, causing potential workflow failures. --- .github/workflows/update-valkey-version.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-valkey-version.yml b/.github/workflows/update-valkey-version.yml index 05d997a..e2f32d4 100644 --- a/.github/workflows/update-valkey-version.yml +++ b/.github/workflows/update-valkey-version.yml @@ -88,12 +88,17 @@ jobs: echo "" >> CHANGELOG.md fi - # Add new entry - sed -i "3i\\ -## [$CHART_VERSION] - $DATE\n\\ -\n\\ -### Changed\n\\ -- Updated Valkey to version $NEW_VERSION (from Chainguard latest image)\n" CHANGELOG.md + # Add new entry using a temp file (compatible with both Linux and macOS) + { + head -n 2 CHANGELOG.md + echo "" + echo "## [$CHART_VERSION] - $DATE" + echo "" + echo "### Changed" + echo "- Updated Valkey to version $NEW_VERSION (from Chainguard latest image)" + echo "" + tail -n +3 CHANGELOG.md + } > CHANGELOG.tmp && mv CHANGELOG.tmp CHANGELOG.md - name: Create Pull Request if: steps.compare.outputs.needs_update == 'true'