Skip to content

Commit

Permalink
Use bot account for sync commit author
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Aug 5, 2022
1 parent 06e7171 commit 1d3a2f4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/dotnet-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
env:
DOTNET_NOLOGO: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BOT_AUTHOR: ${{ secrets.BOT_NAME }} <${{ secrets.BOT_EMAIL }}>

jobs:
sync:
Expand All @@ -22,6 +23,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV

- name: 🔍 BOT_AUTHOR
if: ${{ env.BOT_NAME == '' || env.BOT_EMAIL == '' }}
shell: bash
env:
BOT_NAME: ${{ secrets.BOT_NAME }}
BOT_EMAIL: ${{ secrets.BOT_EMAIL }}
run: echo "BOT_AUTHOR=${GITHUB_AUTHOR} <${GITHUB_AUTHOR}@users.noreply.github.com>" >> $GITHUB_ENV

- name: ⌛ rate
shell: pwsh
run: |
Expand Down Expand Up @@ -73,6 +82,7 @@ jobs:
commit-message: ⬆️ Bump files with dotnet-file sync

${{ env.CHANGES }}
title: "Bump files with dotnet-file sync"
title: "⬆️ Bump files with dotnet-file sync"
body: ${{ env.CHANGES }}
token: ${{ env.GH_TOKEN }}
author: ${{ env.BOT_AUTHOR }}

0 comments on commit 1d3a2f4

Please sign in to comment.