How to get the target branch of the GitHub pull request from an Actions?

前端 未结 3 1741
隐瞒了意图╮
隐瞒了意图╮ 2021-01-20 14:56

When an action is set on pull_request in Github Actions, how to get the target branch? The use case is to retrieve the PR- (and hopefully, branch)-specific comm

3条回答
  •  一整个雨季
    2021-01-20 15:47

    You can access the target branch with ${{ github.event.pull_request.base.ref }}.

    To know the full list of properties of the github.event object, try to run more $GITHUB_EVENT_PATH.

提交回复
热议问题