I’m trying to setup a workflow where the CI triggers another workflow after completion the triggered workflow needs to know the before commit that was available in the CI workflow. The CI workflow is triggered on pull_request (opened, reopened, ready_for_review) as well as push.
From what I understand you can retrieve the reference by using github.event.workflow_run.head_branch
, but is there any way to access for before sha that’s available in the CI workflow through github.event.before
?
Right now I’m getting around this by using actions/github-script
and the github.rest.actions.createWorkflowDispatch()
call available there. But I’m hoping there’s a simpler (cleaner) way of doing this through the workflow_run
event.