diff --git a/.github/scripts/create-release.sh b/.github/scripts/create-release.sh index 9fd16711b..ead98fc40 100755 --- a/.github/scripts/create-release.sh +++ b/.github/scripts/create-release.sh @@ -110,7 +110,7 @@ if [ "$VARIANT" = "" ]; then echo "Creating pull request to update docs ..." branch_name="automation/update_docs_${current_time}" git reset --hard origin/master - git cherry-pick $RELEASE_TAG + git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG git push origin $branch_name gh pr create --repo ${GITHUB_REPOSITORY} \ --base master \ diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 0eae1c0ad..a83356db1 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -57,8 +57,15 @@ jobs: runs-on: ubuntu-latest needs: create-release steps: - - name: Triggers the build + - name: Identify build ref to trigger build and release. + run: | + if [[ "${{ inputs.rel_version }}" == *"SNAPSHOT"* ]]; then + echo "BUILD_GIT_REF=master" >> $GITHUB_ENV + else + echo "BUILD_GIT_REF=v${{ inputs.rel_version }}" >> $GITHUB_ENV + fi + - name: Triggers the build and release. env: GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }} run: | - gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ inputs.rel_version }}' | sed -r 's/^[vV]?([0-9].+)$/\1/') \ No newline at end of file + gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ env.BUILD_GIT_REF }}' | sed -r 's/^[vV]?([0-9].+)$/\1/') \ No newline at end of file