Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute release commit and tag to user triggering the workflow #1437

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
required: true
type: "string"

env:
GIT_AUTHOR_EMAIL: "167856002+mongodb-dbx-release-bot[bot]@users.noreply.github.com"
GIT_AUTHOR_NAME: "mongodb-dbx-release-bot[bot]"

jobs:
prepare-release:
environment: release
Expand Down Expand Up @@ -72,10 +68,12 @@ jobs:
echo '🆕 Creating new release branch ${RELEASE_BRANCH} from ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARY
git checkout -b ${RELEASE_BRANCH}

# Set commit author information to the user that triggered the release workflow
- name: "Set git author information"
run: |
git config user.name "${GIT_AUTHOR_NAME}"
git config user.email "${GIT_AUTHOR_EMAIL}"
GITHUB_USER_ID=$(gh api users/${{ github.actor }} --jq '.id')
git config user.name "${{ github.actor }}"
jyemin marked this conversation as resolved.
Show resolved Hide resolved
git config user.email "${GITHUB_USER_ID}+${{ github.actor }}@users.noreply.github.com"

# This step bumps version numbers in build.gradle and creates git artifacts for the release
- name: "Bump version numbers and create release tag"
Expand Down