Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ [email protected]
DEBUG=true
INIT=true

GITHUB_API_TOKEN=replace-me
GITHUB_API_TOKEN=

# This is an environment variable that deletes all data in database on start up of the app.
# Its primary use is for deployment on remote development environment.
Expand Down
4 changes: 4 additions & 0 deletions apps/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ def validate_ghcr_image(image: str):
else:
raise ValidationError("Could not recognise the GHCR owner. Please try again.")

# Return the image if the GitHub API token is missing
if settings.GITHUB_API_TOKEN in ["", None]:
return image

headers = {"Authorization": f"Bearer {settings.GITHUB_API_TOKEN}", "Accept": "application/vnd.github+json"}

try:
Expand Down
Loading