Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lxk0301 committed Nov 10, 2020
0 parents commit 5ae6737
Show file tree
Hide file tree
Showing 142 changed files with 23,765 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "1"
rules: # Array of rules
- base: master # Required. Target branch
upstream: lxk0301:master # Required. Must be in the same fork network.
mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
mergeUnstable: true # Optional, merge pull request even when the mergeable_state is not clean. Default: false
43 changes: 43 additions & 0 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 构建JD Scripts镜像

on:
workflow_dispatch:
push:
branches:
- master
paths:
- "docker/Dockerfile"

jobs:
build-and-push:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@master

# 要去 https://hub.docker.com/ 那边注册一个账户然后配置用户名密码
# - name: 构建并推送到Dockerhub官方镜像仓库
# uses: docker/build-push-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# dockerfile: docker/Dockerfile
# repository: akyakya/jd_scripts
# tag_with_ref: true

- id: repo_name
uses: ASzc/change-string-case-action@v1
with:
string: ${{ github.repository }}

- name: 构建并推送到Github Packages
uses: docker/build-push-action@v1
if: env.GITHUB_TOKEN
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
dockerfile: docker/Dockerfile
registry: docker.pkg.github.com
repository: ${{ steps.repo_name.outputs.lowercase }}/jd_scripts
tag_with_ref: true
52 changes: 52 additions & 0 deletions .github/workflows/jd_818.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: jd_818

on:
workflow_dispatch:
schedule:
- cron: '0 1,4,7,10,12,16,22 * * *'
watch:
types: started
repository_dispatch:
types: 818
jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lxk0301/scripts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
- name: npm install
run: |
npm install
- name: '运行 【手机狂欢城脚本】'
run: |
node jd_818.js
env:
JD_COOKIE: ${{ secrets.JD_COOKIE }}
JD_DEBUG: ${{ secrets.JD_DEBUG }}
PUSH_KEY: ${{ secrets.PUSH_KEY }}
BARK_PUSH: ${{ secrets.BARK_PUSH }}
BARK_SOUND: ${{ secrets.BARK_SOUND }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
52 changes: 52 additions & 0 deletions .github/workflows/jd_bean_change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: jd_bean_change

on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
watch:
types: started
repository_dispatch:
types: bean_change
jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lxk0301/scripts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
- name: npm install
run: |
npm install
- name: '运行 【京豆变动通知】'
run: |
node jd_bean_change.js
env:
JD_COOKIE: ${{ secrets.JD_COOKIE }}
JD_DEBUG: ${{ secrets.JD_DEBUG }}
PUSH_KEY: ${{ secrets.PUSH_KEY }}
BARK_PUSH: ${{ secrets.BARK_PUSH }}
BARK_SOUND: ${{ secrets.BARK_SOUND }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
54 changes: 54 additions & 0 deletions .github/workflows/jd_bean_sign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: jd_bean_sign

on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *'
watch:
types: started
repository_dispatch:
types: bean_sgin
jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lxk0301/scripts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
- name: npm install
run: |
npm install
- name: '运行 【京豆签到脚本】'
run: |
node jd_bean_sign.js
env:
JD_COOKIE: ${{ secrets.JD_COOKIE }}
JD_DEBUG: ${{ secrets.JD_DEBUG }}
JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长)
JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}}
JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}}
PUSH_KEY: ${{ secrets.PUSH_KEY }}
BARK_PUSH: ${{ secrets.BARK_PUSH }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
BARK_SOUND: ${{ secrets.BARK_SOUND }}
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
53 changes: 53 additions & 0 deletions .github/workflows/jd_blueCoin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: jd_blueCoin

on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *'
watch:
types: started
repository_dispatch:
types: blueCoin
jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lxk0301/scripts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
- name: npm install
run: |
npm install
- name: '运行 【京小超兑换奖品】'
run: |
node jd_blueCoin.js
env:
JD_COOKIE: ${{ secrets.JD_COOKIE }}
JD_DEBUG: ${{ secrets.JD_DEBUG }}
MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS }}
MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY }}
PUSH_KEY: ${{ secrets.PUSH_KEY }}
BARK_PUSH: ${{ secrets.BARK_PUSH }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
BARK_SOUND: ${{ secrets.BARK_SOUND }}
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
51 changes: 51 additions & 0 deletions .github/workflows/jd_club_lottery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: jd_club_lottery

on:
workflow_dispatch:
schedule:
- cron: '0 16 * * *'
watch:
types: started
repository_dispatch:
types: club_lottery
jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lxk0301/scripts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
- name: npm install
run: |
npm install
- name: '运行 【摇京豆脚本】'
run: |
node jd_club_lottery.js
env:
JD_COOKIE: ${{ secrets.JD_COOKIE }}
JD_DEBUG: ${{ secrets.JD_DEBUG }}
PUSH_KEY: ${{ secrets.PUSH_KEY }}
BARK_PUSH: ${{ secrets.BARK_PUSH }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
BARK_SOUND: ${{ secrets.BARK_SOUND }}
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
52 changes: 52 additions & 0 deletions .github/workflows/jd_collectProduceScore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: jd_collectProduceScore

on:
workflow_dispatch:
schedule:
- cron: '30 * * * *'
watch:
types: started
repository_dispatch:
types: collectProduceScore
jobs:
build:

runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: lxk0301/scripts
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
- name: npm install
run: |
npm install
- name: '运行 【京东全民营业领金币】'
run: |
node jd_collectProduceScore.js
env:
JD_COOKIE: ${{ secrets.JD_COOKIE }}
JD_DEBUG: ${{ secrets.JD_DEBUG }}
PUSH_KEY: ${{ secrets.PUSH_KEY }}
BARK_PUSH: ${{ secrets.BARK_PUSH }}
BARK_SOUND: ${{ secrets.BARK_SOUND }}
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
TG_USER_ID: ${{ secrets.TG_USER_ID }}
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
Loading

0 comments on commit 5ae6737

Please sign in to comment.