From 2a3989fb2468f87509c45dff68261bb20bd08ed2 Mon Sep 17 00:00:00 2001 From: Marcus Hert Da Coregio Date: Fri, 3 May 2024 11:40:57 -0300 Subject: [PATCH] Replace Version using sed instead of yq yq does not preserve formatting with in place writing, see https://github.com/mikefarah/yq/issues/465 --- .github/workflows/update-antora-ui-spring.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-antora-ui-spring.yml b/.github/workflows/update-antora-ui-spring.yml index 99b1735..ba141fd 100644 --- a/.github/workflows/update-antora-ui-spring.yml +++ b/.github/workflows/update-antora-ui-spring.yml @@ -33,12 +33,11 @@ jobs: shell: bash env: GH_TOKEN: ${{ secrets.token }} - - name: Replace Version - uses: mikefarah/yq@v4.43.1 + - name: Replace Current with Latest id: replace if: ${{ steps.current.outputs.result != steps.latest.outputs.latest_ui_bundle_url }} - with: - cmd: yq -i '.ui.bundle.url = "${{ steps.latest.outputs.latest_ui_bundle_url }}"' antora-playbook.yml + run: | + sed -i '' -e 's@${{ steps.current.outputs.result }}@${{ steps.latest.outputs.latest_ui_bundle_url }}@g' antora-playbook.yml - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: