Skip to content

Commit

Permalink
update action output to use newer github env method
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Arnold <[email protected]>
  • Loading branch information
sarnold committed Mar 13, 2024
1 parent 2d92b2a commit e0ddd4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions token_getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def generate_installation_curl(self, endpoint):
print(f'curl -i -H "Authorization: token {iat}" -H "Accept: application/vnd.github.machine-man-preview+json" https://api.github.com{endpoint}')

if __name__ == '__main__':

pem_path = 'pem.txt'
app_id = os.getenv('INPUT_APP_ID')
nwo = os.getenv('GITHUB_REPOSITORY')
Expand All @@ -148,5 +148,5 @@ def generate_installation_curl(self, endpoint):
token = app.get_installation_access_token(installation_id=id)
assert token, 'Token not returned!'

print(f"::add-mask::{token}")
print(f"::set-output name=app_token::{token}")
os.system(f'echo ::add-mask::{token}')
os.system(f'echo "app_token={token}">> $GITHUB_ENV')

0 comments on commit e0ddd4b

Please sign in to comment.