Skip to content

Commit e90fdc4

Browse files
fix: jwt set up from pvt key
1 parent ca1a0ae commit e90fdc4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

generate_jwt.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def create_jwt(private_key, app_id):
1414
:return: Encoded JWT.
1515
"""
1616
# Open PEM
17-
with open(private_key, 'rb') as pem_file:
18-
signing_key = jwk_from_pem(pem_file.read())
19-
# signing_key = jwk_from_pem(private_key.encode('utf-8'))
17+
# with open(private_key, 'rb') as pem_file:
18+
# signing_key = jwk_from_pem(pem_file.read())
19+
signing_key = jwk_from_pem(private_key.encode('utf-8'))
2020

2121

2222
payload = {
@@ -116,7 +116,6 @@ def generate_token_by_post_call(installation_id: int, jwt: str, repositories: st
116116
sys.exit(1)
117117

118118
token = response_json['token'] # setting the output token as token inside github output
119-
print(token)
120119
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
121120
fh.write(f'token={token}\n')
122121

0 commit comments

Comments
 (0)