Daily GitHub New Project #412
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
name: Daily GitHub New Project | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: | |
- master | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Cache Python dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('actions/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python Dependencies | |
run: pip install -r actions/requirements.txt | |
- name: Execute Python Script and Save Output | |
env: | |
FREE_QUOTA: ${{ secrets.FREE_QUOTA }} | |
run: python actions/github_new_project.py > content.html | |
- name: Send Email | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
server_address: smtp.163.com | |
server_port: 465 | |
username: ${{ secrets.MAIL_USERNAME }} | |
password: ${{ secrets.MAIL_PASSWORD }} | |
subject: "GitHub最新项目" | |
html_body: file://content.html | |
to: [email protected] | |
from: GitHub Action |