Version bumping working on local repository but not in Github actions #171
-
Hello, I am trying to learn how to automate the version bumping process. I followed the documentation and locally both This is my current configuration: [tool.bumpversion]
allow_dirty = false
commit = true
current_version = "0.0.5"
ignore_missing_files = false
ignore_missing_version = false
message = "Bump version: {current_version} → {new_version}"
parse = "(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)"
regex = false
replace = "{new_version}"
search = "{current_version}"
serialize = [
"{major}.{minor}.{patch}",
]
tag = false
[[tool.bumpversion.files]]
filename = "src/package_name_to_import_with/metadata.json" And this is the error I am getting on Github job:
I have enabled verbose flag and ensured that it is running on a non-default branch so that pre-commit related restrictions should not apply. But these seem to be insufficient. Can someone please suggest with this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the issue is that, by default, GitHub actions does not have permission to commit or push the commits back to the repo. While, I am not an expert on GitHub Actions, I created a personal access token with Repo capabilities. That token is passed into the workflow in the repo's Settings -> Secrets and Variables -> Actions section under "Repository Secrets" To deal with the pre-commit restrictions, I also use I may need to write up something in the docs... |
Beta Was this translation helpful? Give feedback.
I think the issue is that, by default, GitHub actions does not have permission to commit or push the commits back to the repo.
While, I am not an expert on GitHub Actions, I created a personal access token with Repo capabilities. That token is passed into the workflow in the repo's Settings -> Secrets and Variables -> Actions section under "Repository Secrets"
To deal with the pre-commit restrictions, I also use
commit_args = "--no-verify"
in the configurationI may need to write up something in the docs...