Coder Social home page Coder Social logo

actions-bot's Introduction

actions-bot——several robots based on GitHub Actions 🤖

目前包含三个 email 机器人,都是基于 GitHub Actions 实现的

  • weather-emailbot:参照阮一峰老师的一篇教程:GitHub Actions 教程:定时发送天气邮件

  • csdn-emailbot:爬取 CSDN profile 信息,在 runner 服务器部署爬虫环境,并定时发送邮件,可参考 我的博客

  • csdn-spider:刷 CSDN 访问量,随机使用 45 种 user-agent,乱序、随机时间间隔爬取文章,任务完成后发送任务反馈邮件(嘘~ 🤫)

使用方法 ʕ •ᴥ•ʔ

1. 首先点击右上角 🌟Star , 🔱Fork(推荐)或 clone

git clone https://github.com/sculpta/actions-bot.git

2. 修改

  • 对于 weather-emailbot,需修改 main.sh 中的城市信息(具体可参考 chubin/wttr.in)以及将 weather.yml 中 Send mail 步骤的 to 字段修改你要接收邮件的邮箱地址

  • 对于 csdn-emailbot,需修改 main.sh 中的 CSDN_ID 为你的 CSDN_ID,以及将 csdn-emailbot.yml 中 Send mail 步骤的 to 字段修改你要接收邮件的邮箱地址,另外还可以自定义更多玩法,可参考 我的博客

  • 对于 csdn-spider,除了需要修改 CSDN_ID 和接收邮件地址外,由于 GitHub Actions 限制每次任务最多运行 6 小时,所以建议根据需求修改下 spider.py 中的源码(默认是 15~25 分钟访问一篇文章)

3. 配置 SMTP 邮件发送服务

以网易邮箱为例,选择「设置」中的 「POP3/SMTP/IMAP」,打上勾✔之后保存,然后设置密码

注意:该密码不能跟邮箱密码一致

然后,将 SMTP 的用户名和密码添加到仓库的「Secrets」中,如下图所示:

其中,MAIL_USERNAME 是你开通 SMTP 服务的邮箱,MAIL_PASSWORD 是你设置的 SMTP 服务的密码(不是邮箱的登录密码

4. 创建 Workflow

进入仓库的「Actions」,点击「New workflow」、「Set up a workflow yourself」,然后复制 .github/workflows/ 文件夹下的 yml 文件代码,粘贴并 commit,完成 👌

5. Just Enjoy It

License

Apache License 2.0

actions-bot's People

Contributors

shink avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.