Skip to content

Morning Mail: 09-03-2024 #93

Morning Mail: 09-03-2024

Morning Mail: 09-03-2024 #93

Workflow file for this run

name: Receive Morning Mail
on:
issues:
types:
- opened
jobs:
handle-issue:
permissions:
contents: write
issues: write
# Filter out non-email-generated issues
if: ${{ github.event.issue.user.login }} == "fire-bot"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
- name: Install pandoc and requirements
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Save markdown and convert to html
env:
CONTENT: ${{ github.event.issue.body }}
run: |
echo "$CONTENT" > mm.md
pandoc --wrap=preserve mm.md -o mm.html
- name: Run HTML to RSS converter
run: |
python html_to_rss.py mm.html > morning-mail.rss
- name: Commit
run: |
git config user.name "Morning Mail" && git config user.email "[email protected]"
git add morning-mail.rss
git commit -m "$(date)"
git push
- name: Close issue
run: gh issue close "$NUMBER"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}