Skip to content

Workflow not run for action-initiated push to PR using personal access token #25172

Answered by Yanjingzhu
fjeldstad asked this question in Actions
Discussion options

You must be logged in to vote

@hihaj The difference  from your scenario and mine is the checkout action version. You are using actions/checkout@v2 . Checkout action uses the default ${{ github.token }} as the credential, and git client will persist credentials in default.

You need to add persist-credentials to false. And then when you push changes, git client will use your PAT instead of github.token.  

- uses: actions/checkout@v2
      with:
          ref: ${{ github.head_ref }}
          persist-credentials: false

Using PAT to push changes could trigger a new workflow. Please try it and let me know your result. 

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
2 participants