From a4ca1abb7c9234d32242779f7f8efd520bfc7ecc Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Sun, 7 May 2023 00:51:21 -0400 Subject: [PATCH] Adds token to GH actions for GetTwitchDownloader --- .github/workflows/docker-release.yml | 2 ++ .github/workflows/docker.yml | 3 +++ docker-utils/GetTwitchDownloader.py | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 3fd1716..e8dfea9 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -84,3 +84,5 @@ jobs: push: true tags: ${{ steps.docker-meta.outputs.tags }} labels: ${{ steps.docker-meta.outputs.labels }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e683353..5aa3f55 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -84,3 +84,6 @@ jobs: push: true tags: ${{ steps.docker-meta.outputs.tags }} labels: ${{ steps.docker-meta.outputs.labels }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/docker-utils/GetTwitchDownloader.py b/docker-utils/GetTwitchDownloader.py index e236942..d32beb1 100644 --- a/docker-utils/GetTwitchDownloader.py +++ b/docker-utils/GetTwitchDownloader.py @@ -26,7 +26,8 @@ def getZipName(): def getLatestFileInRepo(repo, search_string): # Create an unauthenticated instance of the Github object - g = Github(os.environ.get('GH_TOKEN')) + gh_token = os.environ.get('GH_TOKEN') + g = Github(gh_token if gh_token else None) # ensure it's none if it's falsy # Replace with the repository owner and name repo = g.get_repo(repo)