- Notifications
You must be signed in to change notification settings - Fork262
Closed
Labels
Description
I'm in the process of setting up python-semantic-release for one of my repositories.
Since I need Python 3.11, I can not use the dockerized GitHub Action and use the following instead:
release:name:Releaseif:github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')runs-on:ubuntu-latestconcurrency:releasepermissions:id-token:writecontents:writesteps: -name:Check out repositoryuses:actions/checkout@v4with:fetch-depth:0 -name:Setup Python 3.11uses:actions/setup-python@v4with:python-version:"3.11" -name:Install python-semantic-releaserun:| pip install python-semantic-release -name:Semantic releaseenv:GH_TOKEN:${{ secrets.GH_SEMREL }}run:| semantic-release version
GH_SEMREL contains a "classic" PAT with the repo scope.
But I still only get the message
... raise GitCommandError(redacted_command, status, stderr_value, stdout_value)git.exc.GitCommandError: Cmd('git') failed due to: exit code(1) cmdline: git push ***github.com/***/***.git main stderr: 'remote: error: GH006: Protected branch update failed for refs/heads/main. remote: error: Changes must be made through a pull request. To https://github.com/***/***.git ! [remote rejected] main -> main (protected branch hook declined)error: failed to push some refs to 'https://github.com/***/***.git''Error: Process completed with exit code 1.What am I doing wrong?