From a0bb837dd5522e03ca8275aed4b1c27c8bbb420f Mon Sep 17 00:00:00 2001 From: haptear Date: Fri, 8 Oct 2021 10:45:36 +0800 Subject: [PATCH] hicoin --- .github/workflows/hicornjob.yml | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/hicornjob.yml diff --git a/.github/workflows/hicornjob.yml b/.github/workflows/hicornjob.yml new file mode 100644 index 0000000..4dd474d --- /dev/null +++ b/.github/workflows/hicornjob.yml @@ -0,0 +1,44 @@ +# 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: hi币领取 + +on: + workflow_dispatch: + schedule: + - cron: '55 0-23/8 * * *' + watch: + types: started + repository_dispatch: + types: hicoin_daily +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: haptear/othenautojob + - 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: '运行 【hi币领取】' + run: | + node hicoin_daily.js + env: + HIUSERS: ${{ secrets.HIUSERS }} + DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} + DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} \ No newline at end of file