From 7a36a7270e35292a20c059d60dcbd9d8460db2b6 Mon Sep 17 00:00:00 2001 From: Nick Arellano Date: Tue, 24 Oct 2023 11:35:46 -0500 Subject: [PATCH] fix(docs): Adjust token permissions since the container images were moved to private --- .github/scripts/render-readme.py | 4 ++-- .github/scripts/templates/README.md.j2 | 2 +- .github/workflows/render-readme.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/scripts/render-readme.py b/.github/scripts/render-readme.py index 92f40f9..9ca7578 100644 --- a/.github/scripts/render-readme.py +++ b/.github/scripts/render-readme.py @@ -25,9 +25,9 @@ def get_folder_names(directory: str) -> List[str]: def get_headers() -> dict: """Return the headers for the requests.get call.""" - token = os.getenv("GITHUB_TOKEN") + token = os.getenv("GHCR_TOKEN") if not token: - raise ValueError("Missing environment variable: GITHUB_TOKEN") + raise ValueError("Missing environment variable: GHCR_TOKEN") return { "Accept": "application/vnd.github.v3+json", "Authorization": f"token {token}", diff --git a/.github/scripts/templates/README.md.j2 b/.github/scripts/templates/README.md.j2 index 64a79cb..407cbac 100644 --- a/.github/scripts/templates/README.md.j2 +++ b/.github/scripts/templates/README.md.j2 @@ -7,7 +7,7 @@
-Container | image | Latest Tags +Container | Image | Latest Tags ---|---|--- {% for environment in environments | sort(attribute="name") -%} [{{ environment.name }}]( https://ghcr.io/nickarellano/ee-{{ environment.name }} ) | ghcr.io/nickarellano/ee-{{ environment.name }} | {{ environment.tag }} diff --git a/.github/workflows/render-readme.yaml b/.github/workflows/render-readme.yaml index 857893f..f86812b 100644 --- a/.github/workflows/render-readme.yaml +++ b/.github/workflows/render-readme.yaml @@ -50,6 +50,7 @@ jobs: - name: "Render README.md" env: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }} run: | python ./.github/scripts/render-readme.py