Skip to content

Commit 74bbd88

Browse files
gitenv
1 parent 8083c24 commit 74bbd88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

generate_jwt.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def generate_token_by_post_call(installation_id:int, jwt:str):
8585
if response.status_code == 201:
8686
print(f'Github app installation token generate succcessfully, expires at {response_json["expires_at"]}')
8787
os.environ['GH_APP_TOKEN'] = response_json['token']
88+
# Write the token to GITHUB_ENV to be available in subsequent steps
89+
with open(os.environ['GITHUB_ENV'], 'a') as fh:
90+
fh.write(f"GH_APP_TOKEN={response_json['token']}\n")
8891

8992
def main():
9093
"""

0 commit comments

Comments
 (0)