鉴于下面的 GitHub Actions 工作流程,我如何获取发布触发工作流程的版本的用户名?
name: My Workflow
on:
release:
types: [ published ]
jobs:
my-job:
runs-on: [ my-runner ]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Get username of publisher
run: |
# HOWTO get username of publisher
最佳答案
您正在寻找:
${{ github.event.release.author.login }}
参见:
关于GitHub 操作 : user that published a release,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70790853/