All Projects → lxchuan12 → juejin-actions

lxchuan12 / juejin-actions

Licence: other
掘金每天自动签到 github actions 。组织了每周一起学习200行左右的【源码共读】活动,感兴趣可以加我微信 ruochuan12 参与。

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to juejin-actions

github-act-runner
act as self-hosted runner
Stars: ✭ 68 (+44.68%)
Mutual labels:  actions, github-actions
npm-update-check-action
npm new package version check action for GitHub Actions.
Stars: ✭ 17 (-63.83%)
Mutual labels:  actions, github-actions
build-godot-action
GitHub action that builds a Godot project for multiple platforms
Stars: ✭ 62 (+31.91%)
Mutual labels:  actions, github-actions
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+138.3%)
Mutual labels:  actions, github-actions
gh-pages-action
A GitHub Action to deploy a static site on GitHub Pages.
Stars: ✭ 26 (-44.68%)
Mutual labels:  actions, github-actions
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (-46.81%)
Mutual labels:  actions, github-actions
deno-action
Github action for setup Deno
Stars: ✭ 24 (-48.94%)
Mutual labels:  actions, github-actions
overview
Automate your workflows with GitHub actions for MATLAB.
Stars: ✭ 40 (-14.89%)
Mutual labels:  actions, github-actions
upx-action
Strips and runs upx on binaries
Stars: ✭ 17 (-63.83%)
Mutual labels:  actions, github-actions
github-run-tests-action
mabl Github Actions implementation
Stars: ✭ 39 (-17.02%)
Mutual labels:  actions, github-actions
ghaction-upx
GitHub Action for UPX, the Ultimate Packer for eXecutables
Stars: ✭ 27 (-42.55%)
Mutual labels:  actions, github-actions
Actions Gh Pages
GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
Stars: ✭ 2,576 (+5380.85%)
Mutual labels:  actions, github-actions
ghaction-import-gpg
GitHub Action to easily import a GPG key
Stars: ✭ 161 (+242.55%)
Mutual labels:  actions, github-actions
bridgecrew-action
This Github Action runs Bridgecrew against an Infrastructure-as-Code repository. Bridgecrew performs static security analysis of Terraform & CloudFormation Infrastructure code.
Stars: ✭ 52 (+10.64%)
Mutual labels:  actions, github-actions
action-autotag
Automatically generate a new tag when the manifest file (package.json, Dockerfile, custom file, etc) version changes.
Stars: ✭ 45 (-4.26%)
Mutual labels:  actions, github-actions
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (-21.28%)
Mutual labels:  actions, github-actions
actions-pixela
GitHub Actions for Pixela (a-know/pi) - a-know/pi Setup Action. Linux (Ubuntu), macOS, and Windows are supported.
Stars: ✭ 12 (-74.47%)
Mutual labels:  actions, github-actions
gha
🔧 Test your GitHub Actions workflow locally.
Stars: ✭ 53 (+12.77%)
Mutual labels:  actions, github-actions
action
📦📊 GitHub Action to reports on the size of your npm package
Stars: ✭ 36 (-23.4%)
Mutual labels:  actions, github-actions
Actions Openwrt
A template for building OpenWrt with GitHub Actions | 使用 GitHub Actions 云编译 OpenWrt
Stars: ✭ 4,742 (+9989.36%)
Mutual labels:  actions, github-actions

juejin-actions

2月18日,由于掘金政策不允许,梅楼封发布的警告封号处理消息,可能被封号,所以我禁用了,无法正常签到了。大家可以学习本仓库。另外欢迎添加我的微信 ruochuan12,参加近3000人报名的 源码共读活动,学会看源码相当于打开了新的世界,成长会比较快。

每天掘金自动签到 时间自定义,默认8:00

你好,我是若川。目前持续组织了5个月每周一起学200行左右源码共读活动,每周一期,已进行到20期,感兴趣的可以加我微信 ruochuan12 加群参与,长期交流学习。

使用

fork 我的项目

在项目 settings => secrets 添加 JUEJIN_COOKIE 字段,设置值为掘金 cookie,设置好可以手动触发一次,验证是否正确,下次就会定时触发了,再也不用担心签到了。

掘金 cookie 好像一个月内有效,退出登录后也无效,需要及时更换 cookie

设置 secrets

首次手动触发 workflow

如图所示,就成功了。

workflow 签到结果

获取 掘金 cookie 方法

打开这个页面,登录后,按F12打开开发者工具,刷新页面

fetch/xhr 搜索过滤 get_today_status 这个接口,在 Request Headers 中复制 cookie 的值。如下图所示:

获取 cookie

开启邮箱发送日志的服务

在项目 settings => secrets 中需要额外添加以下字段

字段名 含义 默认值
MAIL_SENDER 发送方邮箱 -
SMTP_PASSWORD 发送方SMTP服务的授权码或者口令 -
MAIL_HOST_SENDER 发送邮件服务器 smtp.qq.com
MAIL_PORT_SENDER 发送邮件服务器的端口号 465
MAIL_RECIPIENT 邮件接受方 -

以QQ邮箱为例

获取授权码

字段名 举例
MAIL_SENDER [email protected](自己邮箱)
SMTP_PASSWORD 上图获取的授权码
MAIL_HOST_SENDER smtp.qq.com
MAIL_PORT_SENDER 465
MAIL_RECIPIENT [email protected](自己邮箱)

新建项目或者已有项目

添加 .github/workflows/main.yml 文件,其中 main 可以自定义成其他名称。

on:
  push:
  schedule:
    # 定时任务 每天 8:00 自动签到,按照计划任务队列,可能延迟 0 + 8 = 北京时间 8
    - cron: '00 0 * * *'

jobs:
  juejin:
    runs-on: ubuntu-latest
    name: 掘金自动签到
    steps:
      - name: Hello world action step
        id: hello
        uses: lxchuan12/juejin-actions@main
        env:
          JUEJIN_COOKIE: ${{secrets.JUEJIN_COOKIE}}
        with:
          who-to-greet: '若川'
      # Use the output from the `hello` step
      - name: Get the output
        run: |
          echo "The time was ${{ steps.hello.outputs.time }}"
          echo "签到结果: ${{ steps.hello.outputs.checkInResult }}"

同样在项目 settings => secrets 添加 JUEJIN_COOKIE 字段,设置值为掘金 cookie

本地开发

# git clone https://github.com/lxchuan12/juejin-actions.git
npm i -g pnpm
pnpm install

# 提交 commit 消息用以下命令,使用了(git-cz)
pnpm run commit
# npm run commit

本地测试

test/env.js 文件代码配置相应配置。

npm run test

TODOs

  • 根据 cookie 自动签到
  • 邮件通知
  • 加入每天免费抽奖功能
  • 加入 eslint
  • 加入 .env 文件
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].