Skip to content

Commit 0f12f5e

Browse files
committed
Try to fix GH auth and CI
1 parent aaf0a98 commit 0f12f5e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python python/create_readme.py
2323
cat README.md
2424
env:
25-
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
- name: Commit changes
2727
run: |
2828
git config user.name "STAC CI"

python/create_readme.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
headers = {}
1515
env = dict(os.environ)
16-
if "github-token" in env:
17-
headers["Authorization"] = " ".join(["token", os.environ["github-token"]])
16+
if "GITHUB_TOKEN" in env:
17+
headers["Authorization"] = " ".join(["Bearer", os.environ["GITHUB_TOKEN"]])
18+
else:
19+
logger.warn("No GITHUB_TOKEN found in env")
1820

1921
def from_gh(response, external = False) -> dict:
2022
data = {

0 commit comments

Comments
 (0)