Created
October 2, 2024 03:11
-
-
Save mjbear/1d2eeb33f5d07c2ce904210335a80302 to your computer and use it in GitHub Desktop.
Dockerfile and entrypoint.sh from https://github.com/planetoftheweb/podcast-generator/pulls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit: https://github.com/planetoftheweb/podcast-generator/pull/2 | |
FROM ubuntu:latest | |
RUN apt-get update && \ | |
apt-get install -y \ | |
python3.10 \ | |
python3-pip \ | |
python3-venv \ | |
git | |
# me: Could also simply use apt-get to install python3-yaml and skip the virtual env altogether | |
# Create a virtual environment | |
RUN python3 -m venv /venv | |
# Install PyYAML within the virtual environment | |
RUN /venv/bin/pip install PyYAML | |
COPY feed.py /usr/bin/feed.py | |
COPY entrypoint.sh /entrypoint.sh | |
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Credit: https://github.com/planetoftheweb/podcast-generator/pull/3 | |
echo "===================" | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${INPUT_EMAIL}" | |
git config --global --add safe.directory /github/workspace | |
# Run your Python script using the Python interpreter from the virtual environment | |
/venv/bin/python /usr/bin/feed.py | |
git add -A && git commit -m "Update Feed" | |
git push --set-upstream origin main | |
echo "===================" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment