We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0160107 commit faab85cCopy full SHA for faab85c
1 file changed
.github/workflows/auto-release.yml
@@ -44,6 +44,16 @@ jobs:
44
private-key: ${{ secrets.APP_PRIVATE_KEY }}
45
owner: ${{ github.repository_owner }}
46
47
+ - name: 获取触发者的昵称
48
+ id: actor_name
49
+ uses: actions/github-script@v7
50
+ with:
51
+ script: |
52
+ const { data: user } = await github.rest.users.getByUsername({
53
+ username: context.actor
54
+ });
55
+ core.setOutput('name', user.name);
56
+
57
- name: 获取触发者的 GitHub 邮箱
58
id: get_email
59
uses: evvanErb/get-github-email-by-username-action@v1.25
@@ -60,7 +70,7 @@ jobs:
60
70
61
71
# 设置用户名
62
72
if [ -z "$input_name" ]; then
63
- author_name="${{ github.actor }}"
73
+ author_name="${{ steps.actor_name.outputs.name }}"
64
74
echo "未提供用户名,使用 GitHub 用户名: $author_name"
65
75
else
66
76
author_name="$input_name"
0 commit comments