Skip to content

Commit 9078ed3

Browse files
authored
Merge branch 'main' into split-binary-ci
2 parents e704e27 + 99cc31b commit 9078ed3

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/scripts/bump-versions.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ if [ "$commit_changes" = false ]; then
180180
exit 0
181181
fi
182182

183-
git config --global user.name "github-actions[bot]"
184-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
185-
186183
commit_changes() {
187184
local current_version=$1
188185
local next_version=$2
@@ -203,7 +200,7 @@ create_pr() {
203200

204201
gh pr create --title "[chore] Prepare release $next_version" \
205202
--body "This PR updates the version from $current_version to $next_version" \
206-
--base main --head "$branch_name" --draft
203+
--base main --head "$branch_name"
207204
}
208205

209206
# TODO: Once Collector 1.0 is released, we can consider removing the

.github/workflows/update-version.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,31 @@ jobs:
2626
env:
2727
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
steps:
29+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
30+
id: otelbot-token
31+
with:
32+
app-id: ${{ vars.OTELBOT_APP_ID }}
33+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
34+
35+
# The next 2 steps are taken from # from https://github.com/actions/create-github-app-token#create-a-git-committer-string-for-an-app-installation
36+
- name: Get GitHub App User ID
37+
id: get-user-id
38+
run: echo "user-id=$(gh api "/users/${{ steps.otelbot-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
39+
env:
40+
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
41+
42+
- name: Set up commit author name and email
43+
id: committer
44+
run: |
45+
echo "name=${{ steps.otelbot-token.outputs.app-slug }}[bot]" >> "$GITHUB_OUTPUT"
46+
echo "email=${{ steps.get-user-id.outputs.user-id }}+${{ steps.otelbot-token.outputs.app-slug }}[bot]@users.noreply.github.com>" >> "$GITHUB_OUTPUT"
47+
git config --global user.name "$name"
48+
git config --global user.email "$email"
49+
2950
- name: Checkout repository
3051
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
with:
53+
token: ${{ steps.otelbot-token.outputs.token }}
3154

3255
- name: Run bump-versions.sh
3356
run: |

0 commit comments

Comments
 (0)