|
| 1 | +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| 3 | + |
| 4 | +name: 京东星店长 |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + schedule: |
| 9 | + - cron: '5 1 * * * ' |
| 10 | + watch: |
| 11 | + types: started |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + |
| 16 | + runs-on: ubuntu-latest |
| 17 | + if: github.event.repository.owner.id == github.event.sender.id |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v1 |
| 20 | + - name: Use Node.js 10.x |
| 21 | + uses: actions/setup-node@v1 |
| 22 | + with: |
| 23 | + node-version: 10.x |
| 24 | + - name: npm install |
| 25 | + run: | |
| 26 | + npm install |
| 27 | + npm install request |
| 28 | + npm install --save got |
| 29 | + npm install tough-cookie |
| 30 | + - name: '京东星店长' |
| 31 | + env: |
| 32 | + COOKIE: ${{secrets.JD_COOKIE}} |
| 33 | + TG_BOT_TOKEN : ${{secrets.TG_BOT_TOKEN}} |
| 34 | + TG_USER_ID : ${{secrets.TG_USER_ID}} |
| 35 | + REMOTE_URL: https://raw.githubusercontent.com/yangtingxiao/QuantumultX/master/scripts/jd/jd_starStore.js |
| 36 | + MULT_CUSTOM_REPLACE: '[[{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-YTX'')"}], |
| 37 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-SR'')"}], |
| 38 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-LJ'')"}], |
| 39 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-ZGX'')"}], |
| 40 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-WJY'')"}], |
| 41 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-LJ2'')"}], |
| 42 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-RQ'')"}], |
| 43 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-WRX'')"}], |
| 44 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-GC'')"}], |
| 45 | + [{key : /const \$.+\(''(.+)''\);/,value : "const $ = new Env(''$1-WSR'')"}] |
| 46 | + ]' |
| 47 | + run: | |
| 48 | + node 'scripts/remote/runRemoteScripts.js' |
0 commit comments