Skip to content

unable to push git tag on protected branch with required status checks #2557

Discussion options

You must be logged in to vote

Found the solution.

  1. Use personal access token of public_repo (for public repos) or repo (for private and public repos) permission

  1. Make sure to NOT persist credentials when pulling the git repo in github-actions
  semantic-release:
    needs: docker-build
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development'
    steps:
      - uses: actions/checkout@v3
        with:
          persist-credentials: false

      - uses: actions/cache@v3
        id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
        with:
          path: |
            **/node_modules
            ${{ needs.instal…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@Clumsy-Coder
Comment options

@travi
Comment options

Comment options

You must be logged in to vote
3 replies
@niyowski
Comment options

@cloverink
Comment options

Answer selected by Clumsy-Coder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2556 on September 12, 2022 03:22.