Skip to content

fix(ci): Set git identity in prior step #266

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

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,20 @@ jobs:
with:
fetch-depth: 0

- name: Set git user to getsentry-bot
if: github.ref == 'refs/heads/master'
run: |
echo "GIT_COMMITTER_NAME=getsentry-bot" >> $GITHUB_ENV;
echo "GIT_AUTHOR_NAME=getsentry-bot" >> $GITHUB_ENV;
echo "[email protected]" >> $GITHUB_ENV;

- name: Evaluate docker tag
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "DOCKER_TAG=master" >> $GITHUB_ENV
yarn set-docker-tag master

if ! git diff --quiet action.yml; then
echo "GIT_COMMITTER_NAME=getsentry-bot" >> $GITHUB_ENV;
echo "GIT_AUTHOR_NAME=getsentry-bot" >> $GITHUB_ENV;
echo "[email protected]" >> $GITHUB_ENV;

git add action.yml
SKIP=lint,format,set-docker-tag-from-branch git commit -m "chore: Set docker tag for master [skip-ci]"
git push
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }}
INPUT_DISABLE_TELEMETRY: ${{ inputs.disable_telemetry }}
INPUT_DISABLE_SAFE_DIRECTORY: ${{ inputs.disable_safe_directory }}
uses: docker://ghcr.io/getsentry/action-release-image:ab-hybrid-action
uses: docker://ghcr.io/getsentry/action-release-image:ab-set-git-identity

# For actions running on macos or windows runners, we use a composite
# action approach which allows us to install the arch specific sentry-cli
Expand Down