Email_pusher #2257
This file contains hidden or 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: Email_pusher | |
| on: | |
| schedule: | |
| - cron: "0 */4 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| email-pusher: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout output branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: output | |
| - name: Send Blog Update Email | |
| uses: weekdaycare/email-pusher@main | |
| with: | |
| rss_url: "https://weekdaycare.github.io/atom.xml" | |
| smtp_server: "smtp.feishu.cn" | |
| smtp_port: 587 | |
| sender_email: "comment@weekdaycare.cn" | |
| smtp_use_tls: "true" | |
| subscribe_json_url: "https://raw.githubusercontent.com/weekdaycare/Friends-issue/output/v2/subscribe.json" | |
| website_title: "星日语" | |
| website_icon: "https://weekdaycare.cn/asset/avatar.svg" | |
| smtp_password: ${{ secrets.SMTP_PASSWORD }} | |
| - name: Switch to output branch and update file | |
| run: | | |
| mkdir -p v2 | |
| cp last_articles.json v2/last_articles.json | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add v2/last_articles.json | |
| git commit -m "Update last_articles.json [bot]" || echo "No changes to commit" | |
| git push origin HEAD:output |