Skip to content

Commit 494fb4d

Browse files
mergify[bot]rdner
andauthoredJun 7, 2024
Create a version update branch after the mage target is run (#4872) (#4875)
The mage target now requires to be run on a release branch. (cherry picked from commit 2a7f93a) Co-authored-by: Denis <denis.rechkunov@elastic.co>
1 parent d9acccd commit 494fb4d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎.github/workflows/bump-agent-versions.sh

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ else
1616
echo "Another PR for $GITHUB_REF_NAME is in review, skipping..."
1717
exit 0
1818
fi
19+
# the mage target above requires to be on a release branch
20+
# so, the new branch should not be created before the target is run
21+
git checkout -b update-agent-versions-$GITHUB_RUN_ID
1922
git add .agent-versions.json .package-version
2023

2124
nl=$'\n' # otherwise the new line character is not recognized properly

‎.github/workflows/bump-agent-versions.yml

-4
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ jobs:
3131
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
3232
git config --global user.name "github-actions[bot]"
3333
34-
- name: Set up branch
35-
run: git checkout -b update-agent-versions-$GITHUB_RUN_ID
36-
3734
- name: Install mage
3835
uses: magefile/mage-action@v3
3936
with:
@@ -88,4 +85,3 @@ jobs:
8885
env:
8986
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
9087
SLACK_MESSAGE: "Update for Elastic Agent versions has been created: ${{ steps.update.outputs.pr }}"
91-

0 commit comments

Comments
 (0)