Skip to content

Commit

Permalink
token
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed May 20, 2024
1 parent e92072b commit 7013dd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/download_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

cwd = Path(os.getcwd())

github_token = os.environ.get("TOKEN_GITHUB")
github_token = os.environ.get("GITHUB_TOKEN")
headers = {
'Accept': 'application/vnd.github+json',
'Authorization': f'Bearer {github_token}',
Expand All @@ -36,7 +36,9 @@

response = requests.get('https://api.github.com/repos/NREL/lk/actions/artifacts', headers=headers)
r = response.json()
print(r)
if 'bad' in r['message']:
raise RuntimeError(r)

artifacts = r['artifacts']

matching_artifacts = [art for art in artifacts if re.search(wx_name, art['name'])]
Expand Down

0 comments on commit 7013dd2

Please sign in to comment.