forked from wazuh/wazuh-docker
Merge pull request #2554 from wazuh/merge-4.14.8-into-5.0.0
Merge 4.14.8 into 5.0.0
This commit is contained in:
@@ -6,7 +6,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
image_tag:
|
image_tag:
|
||||||
description: 'Docker image tag'
|
description: 'Docker image tag'
|
||||||
default: '4.14.7'
|
default: '4.14.8'
|
||||||
required: true
|
required: true
|
||||||
docker_reference:
|
docker_reference:
|
||||||
description: 'wazuh-docker reference'
|
description: 'wazuh-docker reference'
|
||||||
@@ -38,7 +38,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
image_tag:
|
image_tag:
|
||||||
description: 'Docker image tag'
|
description: 'Docker image tag'
|
||||||
default: '4.14.7'
|
default: '4.14.8'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
docker_reference:
|
docker_reference:
|
||||||
|
|||||||
@@ -110,13 +110,21 @@ jobs:
|
|||||||
bash ${{ env.BUMP_SCRIPT_PATH }} ${{ steps.vars.outputs.script_params }}
|
bash ${{ env.BUMP_SCRIPT_PATH }} ${{ steps.vars.outputs.script_params }}
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
|
id: bump_commit
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git commit -m "feat: bump ${{ github.ref_name }}"
|
if git diff --staged --quiet; then
|
||||||
git push origin ${{ steps.vars.outputs.branch_name }}
|
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 }}"
|
||||||
|
git push origin ${{ steps.vars.outputs.branch_name }}
|
||||||
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
id: create_pr
|
id: create_pr
|
||||||
|
if: steps.bump_commit.outputs.has_changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
gh auth setup-git
|
gh auth setup-git
|
||||||
PR_URL=$(gh pr create \
|
PR_URL=$(gh pr create \
|
||||||
@@ -129,14 +137,19 @@ jobs:
|
|||||||
echo "pull_request_url=${PR_URL}" >> $GITHUB_OUTPUT
|
echo "pull_request_url=${PR_URL}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Merge pull request
|
- name: Merge pull request
|
||||||
|
if: steps.bump_commit.outputs.has_changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
# Any checks for the PR are bypassed since the branch is expected to be functional (i.e. the bump process does not introduce any bugs)
|
# Any checks for the PR are bypassed since the branch is expected to be functional (i.e. the bump process does not introduce any bugs)
|
||||||
gh pr merge "${{ steps.create_pr.outputs.pull_request_url }}" --merge --admin
|
gh pr merge "${{ steps.create_pr.outputs.pull_request_url }}" --merge --admin
|
||||||
|
|
||||||
- name: Show logs
|
- name: Show logs
|
||||||
run: |
|
run: |
|
||||||
echo "Bump complete."
|
if [[ "${{ steps.bump_commit.outputs.has_changes }}" == "true" ]]; then
|
||||||
echo "Branch: ${{ steps.vars.outputs.branch_name }}"
|
echo "Bump complete."
|
||||||
echo "PR: ${{ steps.create_pr.outputs.pull_request_url }}"
|
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:"
|
echo "Bumper scripts logs:"
|
||||||
cat ${BUMP_LOG_PATH}/repository_bumper*log
|
cat ${BUMP_LOG_PATH}/repository_bumper*log
|
||||||
Reference in New Issue
Block a user