From 3f2ebfac37c5c60ba56838b097bd84e9eb2444a4 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Fri, 3 Jul 2026 16:08:43 -0300 Subject: [PATCH 1/2] Fix bumper workflow failure when bump produces no changes --- .github/workflows/5_bumper_repository.yml | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/5_bumper_repository.yml b/.github/workflows/5_bumper_repository.yml index 281b4775..43241783 100644 --- a/.github/workflows/5_bumper_repository.yml +++ b/.github/workflows/5_bumper_repository.yml @@ -144,10 +144,17 @@ jobs: bash ${{ env.BUMP_SCRIPT_PATH }} ${{ steps.vars.outputs.script_params }} - name: Commit changes (Bump) + id: bump_commit if: inputs.revert != true run: | git add . - git commit -m "feat: bump ${{ github.ref_name }}" + if git diff --staged --quiet; then + echo "Nothing to bump: the repository is already at the requested version/stage. Skipping commit." + echo "has_changes=false" >> $GITHUB_OUTPUT + else + git commit -m "feat: bump ${{ github.ref_name }}" + echo "has_changes=true" >> $GITHUB_OUTPUT + fi - name: Fetch full history (Revert) if: inputs.revert == true @@ -198,13 +205,13 @@ jobs: fi - name: Push changes - if: inputs.revert != true || (inputs.revert == true && steps.revert_step.outputs.has_changes == 'true') + if: (inputs.revert != true && steps.bump_commit.outputs.has_changes == 'true') || (inputs.revert == true && steps.revert_step.outputs.has_changes == 'true') run: | git push origin ${{ steps.vars.outputs.branch_name }} - name: Create pull request id: create_pr - if: inputs.revert != true || (inputs.revert == true && steps.revert_step.outputs.has_changes == 'true') + if: (inputs.revert != true && steps.bump_commit.outputs.has_changes == 'true') || (inputs.revert == true && steps.revert_step.outputs.has_changes == 'true') run: | gh auth setup-git PR_URL=$(gh pr create \ @@ -217,7 +224,7 @@ jobs: echo "pull_request_url=${PR_URL}" >> $GITHUB_OUTPUT - name: Merge pull request - if: inputs.revert != true || (inputs.revert == true && steps.revert_step.outputs.has_changes == 'true') + if: (inputs.revert != true && steps.bump_commit.outputs.has_changes == 'true') || (inputs.revert == true && steps.revert_step.outputs.has_changes == 'true') run: | # Any checks for the PR are bypassed since the branch is expected to be functional gh pr merge "${{ steps.create_pr.outputs.pull_request_url }}" --merge --admin @@ -225,9 +232,13 @@ jobs: - name: Show logs if: inputs.revert != true run: | - echo "Bump complete." - echo "Branch: ${{ steps.vars.outputs.branch_name }}" - echo "PR: ${{ steps.create_pr.outputs.pull_request_url }}" + if [[ "${{ steps.bump_commit.outputs.has_changes }}" == "true" ]]; then + echo "Bump complete." + echo "Branch: ${{ steps.vars.outputs.branch_name }}" + echo "PR: ${{ steps.create_pr.outputs.pull_request_url }}" + else + echo "Bump skipped: the repository is already at the requested version/stage." + fi echo "Bumper scripts logs:" cat ${BUMP_LOG_PATH}/repository_bumper*log From 495b67251e364fede7dd220f074efe37241198e4 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Tue, 7 Jul 2026 09:46:59 -0300 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebdebb62..d7a7da87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fix bumper workflow failure when bump produces no changes ([#2533](https://github.com/wazuh/wazuh-docker/pull/2533)) - Bumper script issue when the tag is set to false ([#2477](https://github.com/wazuh/wazuh-docker/issues/2477)) - Fix reported WF vulnerabilities ([#2443](https://github.com/wazuh/wazuh-docker/issues/2443)) - Adapt Wazuh manager healthcheck with local binaries ([#2422](https://github.com/wazuh/wazuh-docker/issues/2422)) @@ -76,4 +77,4 @@ All notable changes to this project will be documented in this file. - Development - DevOps 5.0 adaptation - Docker - Delete lists directory references ([#2128](https://github.com/wazuh/wazuh-docker/issues/2128)) ## Prior version -- []() \ No newline at end of file +- []()