Skip to content

Commit

Permalink
Fix conflict and build trigger on right branch for SNAPSHOT. (#1180)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <[email protected]>
  • Loading branch information
artursouza authored Dec 10, 2024
1 parent dec757c commit 6fd5a5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ env.BUILD_GIT_REF }}' | sed -r 's/^[vV]?([0-9].+)$/\1/')

0 comments on commit 6fd5a5a

Please sign in to comment.