mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-24 21:39:06 +00:00
Push local changes
This commit is contained in:
@@ -14,6 +14,7 @@ from github import Github
|
||||
GITHUB_REPOSITORY = os.getenv('GITHUB_REPOSITORY')
|
||||
|
||||
GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')
|
||||
GITHUB_REF_NAME = os.getenv('GITHUB_REF_NAME')
|
||||
PRODUCTION = os.getenv('PRODUCTION', False)
|
||||
|
||||
CURRENT_FILE = Path(__file__)
|
||||
@@ -191,6 +192,13 @@ def main():
|
||||
# git log --max-count=1 --patch
|
||||
print(local_repo.git.log(max_count='1', patch=True, color='always'))
|
||||
|
||||
# Push local changes.
|
||||
server = 'https://{}@github.com/{}.git'.format(
|
||||
GITHUB_TOKEN, GITHUB_REPOSITORY)
|
||||
print('pushing changes to branch "{}" of repository "{}"'.format(
|
||||
GITHUB_REF_NAME, GITHUB_REPOSITORY))
|
||||
print(local_repo.git.push(server, GITHUB_REF_NAME))
|
||||
|
||||
# Create tag and release.
|
||||
tag = result['new_version']
|
||||
tag_message = result['message']
|
||||
|
||||
Reference in New Issue
Block a user