Skip to content

Commit 54f3997

Browse files
authored
Fix create release script. (#1233)
Signed-off-by: Artur Souza <[email protected]>
1 parent 7994fe8 commit 54f3997

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/scripts/create-release.sh

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ if [ "$VARIANT" = "" ]; then
105105
git clean -xdf
106106
echo "Updating docs in master branch ..."
107107
git checkout master
108+
git fetch origin
108109
git reset --hard origin/master
109110
git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG
110111
git push origin master

.github/workflows/create-release.yml

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
with:
3434
fetch-depth: 0
3535
token: ${{ secrets.DAPR_BOT_TOKEN }}
36+
persist-credentials: false
3637
- name: Set up OpenJDK ${{ env.JDK_VER }}
3738
uses: actions/setup-java@v4
3839
with:
@@ -43,9 +44,13 @@ jobs:
4344
sudo apt-get update
4445
sudo apt-get install pcre2-utils
4546
- name: Create release branch and tag
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
4649
run: |
4750
git config user.email "[email protected]"
4851
git config user.name "Dapr Bot"
52+
# Update origin with token
53+
git remote set-url origin https://x-access-token:${{ secrets.DAPR_BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
4954
# Copy first to allow automation to use the latest version and not the release branch's version.
5055
cp -R ./.github/scripts ${RUNNER_TEMP}/
5156
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}

0 commit comments

Comments
 (0)