Skip to content

Question about 'on pull_request' build workflow behavior #25823

Answered by Yanjingzhu
omindu asked this question in Actions
Discussion options

You must be logged in to vote

If you add with.ref , it will check out the specific branch. In your example, it checked out master branch. It didn’t include your pull request content.

Please remove with.ref from actions/checkout@v1

with:
   ref: master

      

Just use

- uses: actions/checkout@v1

By default, the branch or tag ref that triggered the workflow will be checked out. If the workflow is triggered by pull request, then refs/remotes/pull/[id]/merge will be checkout.

 

For more detail info, please refer to Checkout Action document > https://github.com/actions/checkout#usage

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants