signin #1149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: signin | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '*.py' | |
- '.github/workflows/signin.yml' | |
- 'requirements.txt' | |
- '!viewsecrets.py' | |
# watch: | |
# types: started | |
schedule: | |
- cron: '0 1,13 * * *' | |
workflow_dispatch: | |
inputs: | |
ssh: | |
description: 'SSH connection to Actions' | |
required: false | |
default: 'false' | |
flushcache: | |
description: 'flushcache' | |
required: false | |
default: 'true' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
#if: github.event.repository.owner.id == github.event.sender.id | |
environment: Production | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Set proxy | |
id: setproxy | |
uses: w311ang/setproxy@main | |
with: | |
config: ${{ secrets.ss_config }} | |
password: ${{ secrets.frp_auth }} | |
redirect: ${{ secrets.frp_redirect }} | |
- name: SSH connection to Actions | |
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') | |
uses: P3TERX/ssh2actions@v1.0.0 | |
env: | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
sendingData: ${{ secrets.classbeans_sendingdata }} | |
token: ${{ secrets.classbeans_token }} | |
userid: ${{ secrets.classbeans_userid }} | |
token2: ${{ secrets.class_token }} | |
sendtext: ${{ secrets.class_sendtext }} | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./disabledrepos.json | |
./caizuan.json | |
key: ${{ github.job }}-${{ github.run_id }} | |
restore-keys: | | |
${{ github.job }}- | |
- name: flushCache | |
if: always() && ((github.event.inputs.flushcache == 'true' && github.event.inputs.flushcache != 'false') || github.event_name == 'push') | |
run: | | |
rm disabledrepos.json || true | |
- name: xcysc | |
if: always() && steps.setproxy.outcome == 'success' | |
env: | |
username: ${{ secrets.xc_username }} | |
password: ${{ secrets.xc_password }} | |
run: | | |
proxychains python -u xc_signin.py | |
#- name: sjly | |
# if: always() | |
# env: | |
# id: ${{ secrets.sjly_id }} | |
# run: | | |
# proxychains python -u sjly.py | |
#- name: zhuan | |
# if: always() && steps.setproxy.outcome == 'success' | |
# env: | |
# cookie: ${{ secrets.zhuan_cookie }} | |
# run: | | |
# proxychains python -u zhuan.py | |
# - name: class | |
# if: always() && steps.setproxy.outcome == 'success' | |
# env: | |
# token: ${{ secrets.class_token }} | |
# sendtext: ${{ secrets.class_sendtext }} | |
# run: | | |
# proxychains python -u class.py | |
#- name: blisign | |
# if: always() && steps.setproxy.outcome == 'success' | |
# env: | |
# idlist: ${{ secrets.blisign_idlist }} | |
# token: ${{ secrets.blisign_token }} | |
# run: | | |
# proxychains python -u blisign.py | |
- name: classBeans | |
if: always() && steps.setproxy.outcome == 'success' | |
env: | |
sendingData: ${{ secrets.classbeans_sendingdata }} | |
token: ${{ secrets.classbeans_token }} | |
userid: ${{ secrets.classbeans_userid }} | |
run: | | |
proxychains python -u classBeans.py | |
#- name: kafan | |
# if: always() | |
# env: | |
# cookie: ${{ secrets.kafan_cookie }} | |
# run: | | |
# proxychains python -u kafan.py | |
#- name: tadu | |
# if: always() | |
# env: | |
# cookie: ${{ secrets.tadu_cookie }} | |
# uses: nick-invision/retry@v2 | |
# with: | |
# timeout_minutes: 2 | |
# max_attempts: 3 | |
# command: | | |
# proxychains python -u tadu.py | |
#- name: fuckbigstudy | |
# if: always() | |
# env: | |
# cookie: ${{ secrets.fuckbigstudy_cookie }} | |
# wxopenid: ${{ secrets.fuckbigstudy_wxopenid }} | |
# run: | | |
# proxychains python -u fuckbigstudy.py | |
#- name: bird | |
# if: always() && steps.setproxy.outcome == 'success' | |
# env: | |
# username: ${{ secrets.bird_username }} | |
# password: ${{ secrets.bird_password }} | |
# run: | | |
# proxychains python -u bird.py | |
- name: caizuan | |
if: always() && steps.setproxy.outcome == 'success' | |
env: | |
userid: ${{ secrets.caizuan_userid }} | |
openid: ${{ secrets.caizuan_openid }} | |
sign: ${{ secrets.caizuan_sign }} | |
jmail: ${{ secrets.JMAIL_PASSWORD }} | |
sckey: ${{ secrets.servercheck_key }} | |
on: ${{ github.event_name }} | |
targetGold: ${{ secrets.caizuan_targetgold }} | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
on_retry_command: | | |
sudo systemctl restart shadowsocks-libev-local@client | |
sleep 5s | |
command: | | |
proxychains python -u caizuan.py | |
- name: repochecker | |
if: always() && steps.setproxy.outcome == 'success' | |
env: | |
jmail: ${{ secrets.JMAIL_PASSWORD }} | |
token: ${{ secrets.repochecker_token }} | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
# retry_wait_seconds: 60 | |
on_retry_command: | | |
sudo systemctl restart shadowsocks-libev-local@client | |
sleep 5s | |
command: | | |
proxychains python -u repochecker.py | |
# - name: hlx | |
# if: always() && steps.setproxy.outcome == 'success' | |
# env: | |
# users: ${{ secrets.hlx_users }} | |
# uses: nick-invision/retry@v2 | |
# with: | |
# timeout_minutes: 10 | |
# max_attempts: 3 | |
# command: | | |
# proxychains python -u hlx.py | |
- name: dada | |
if: always() && steps.setproxy.outcome == 'success' | |
env: | |
config: ${{ secrets.dada_config }} | |
run: | | |
proxychains python -u dada.py | |
- uses: gautamkrishnar/keepalive-workflow@master |