Skip to content

Commit

Permalink
Merge pull request #29 from RetroArcher/nightly
Browse files Browse the repository at this point in the history
v0.0.1
  • Loading branch information
ReenigneArcher authored Apr 4, 2022
2 parents bdface2 + 9629a31 commit da1ab92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
FROM python:3.9.12-bullseye

# Basic config
ARG DAILY_TASKS=True
ARG DAILY_RELEASES=True
ARG DAILY_TASKS_UTC_HOUR=12
ARG daily_tasks=true
ARG daily_releases=true
ARG daily_tasks_utc_hour=12

# Secret config
ARG BOT_TOKEN
ARG DAILY_CHANNEL_ID
ARG GRAVATAR_EMAIL
ARG IGDB_CLIENT_ID
ARG IGDB_CLIENT_SECRET
ARG bot_token
ARG daily_channel_id
ARG gravatar_email
ARG igdb_client_id
ARG igdb_client_secret

# Environment variables
ENV DAILY_TASKS=$DAILY_TASKS
ENV DAILY_RELEASES=$DAILY_RELEASES
ENV DAILY_CHANNEL_ID=$DAILY_CHANNEL_ID
ENV DAILY_TASKS_UTC_HOUR=$DAILY_TASKS_UTC_HOUR
ENV BOT_TOKEN=$BOT_TOKEN
ENV GRAVATAR_EMAIL=$GRAVATAR_EMAIL
ENV IGDB_CLIENT_ID=$IGDB_CLIENT_ID
ENV IGDB_CLIENT_SECRET=$IGDB_CLIENT_SECRET
ENV daily_tasks=$DAILY_TASKS
ENV daily_releases=$DAILY_RELEASES
ENV daily_channel_id=$DAILY_CHANNEL_ID
ENV daily_tasks_utc_hour=$DAILY_TASKS_UTC_HOUR
ENV bot_token=$BOT_TOKEN
ENV gravatar_email=$GRAVATAR_EMAIL
ENV igdb_client_id=$IGDB_CLIENT_ID
ENV igdb_client_secret=$IGDB_CLIENT_SECRET

COPY requirements.txt .
COPY *.py .
Expand Down
4 changes: 2 additions & 2 deletions discord_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async def on_ready():
except KeyError:
daily_task.start()
else:
if os.environ['daily_tasks'] == 'true':
if os.environ['daily_tasks'].lower() == 'true':
daily_task.start()
else:
print("'daily_tasks' environment variable is disabled")
Expand Down Expand Up @@ -379,7 +379,7 @@ async def daily_task():
except KeyError:
daily_releases = True
else:
if os.environ['daily_tasks'] == 'true':
if os.environ['daily_tasks'].lower() == 'true':
daily_releases = True
else:
print("'daily_releases' environment variable is disabled")
Expand Down

0 comments on commit da1ab92

Please sign in to comment.