Skip to content

How to push to a protected branch support #164

@nodesocket

Description

@nodesocket

I am using personal access token from a machine user sa-machine-user. Then I specify:

 - name: Push
    uses: ad-m/github-push-action@master
    with:
      github_token: ${{ secrets.MACHINE_USER_PERSONAL_ACCESS_TOKEN }}
      force: false

Finally in the repo I have allowed this user:

Screenshot 2023-04-19 at 2 16 42 PM

But still getting:

remote: error: GH006: Protected branch update failed for refs/heads/dev.        
remote: error: At least 1 approving review is required by reviewers with write access. You're not authorized to push to this branch. Visit https://docs.github.com/articles/about-protected-branches/ for more information.   

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions