Skip to content

Commit 6fd5a5a

Browse files
authored
Fix conflict and build trigger on right branch for SNAPSHOT. (#1180)
Signed-off-by: Artur Souza <asouza.pro@gmail.com>
1 parent dec757c commit 6fd5a5a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/scripts/create-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ if [ "$VARIANT" = "" ]; then
110110
echo "Creating pull request to update docs ..."
111111
branch_name="automation/update_docs_${current_time}"
112112
git reset --hard origin/master
113-
git cherry-pick $RELEASE_TAG
113+
git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG
114114
git push origin $branch_name
115115
gh pr create --repo ${GITHUB_REPOSITORY} \
116116
--base master \

.github/workflows/create-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,15 @@ jobs:
5757
runs-on: ubuntu-latest
5858
needs: create-release
5959
steps:
60-
- name: Triggers the build
60+
- name: Identify build ref to trigger build and release.
61+
run: |
62+
if [[ "${{ inputs.rel_version }}" == *"SNAPSHOT"* ]]; then
63+
echo "BUILD_GIT_REF=master" >> $GITHUB_ENV
64+
else
65+
echo "BUILD_GIT_REF=v${{ inputs.rel_version }}" >> $GITHUB_ENV
66+
fi
67+
- name: Triggers the build and release.
6168
env:
6269
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
6370
run: |
64-
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ inputs.rel_version }}' | sed -r 's/^[vV]?([0-9].+)$/\1/')
71+
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ env.BUILD_GIT_REF }}' | sed -r 's/^[vV]?([0-9].+)$/\1/')

0 commit comments

Comments
 (0)