Skip to content

Commit 1d3a2f4

Browse files
committed
Use bot account for sync commit author
1 parent 06e7171 commit 1d3a2f4

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/dotnet-file.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
DOTNET_NOLOGO: true
1212
GH_TOKEN: ${{ secrets.GH_TOKEN }}
13+
BOT_AUTHOR: ${{ secrets.BOT_NAME }} <${{ secrets.BOT_EMAIL }}>
1314

1415
jobs:
1516
sync:
@@ -22,6 +23,14 @@ jobs:
2223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2324
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
2425

26+
- name: 🔍 BOT_AUTHOR
27+
if: ${{ env.BOT_NAME == '' || env.BOT_EMAIL == '' }}
28+
shell: bash
29+
env:
30+
BOT_NAME: ${{ secrets.BOT_NAME }}
31+
BOT_EMAIL: ${{ secrets.BOT_EMAIL }}
32+
run: echo "BOT_AUTHOR=${GITHUB_AUTHOR} <${GITHUB_AUTHOR}@users.noreply.github.com>" >> $GITHUB_ENV
33+
2534
- name: ⌛ rate
2635
shell: pwsh
2736
run: |
@@ -73,6 +82,7 @@ jobs:
7382
commit-message: ⬆️ Bump files with dotnet-file sync
7483

7584
${{ env.CHANGES }}
76-
title: "Bump files with dotnet-file sync"
85+
title: "⬆️ Bump files with dotnet-file sync"
7786
body: ${{ env.CHANGES }}
7887
token: ${{ env.GH_TOKEN }}
88+
author: ${{ env.BOT_AUTHOR }}

0 commit comments

Comments
 (0)