{"id":13468056,"url":"https://github.com/zhangt2333/actions-easyconnect","last_synced_at":"2025-03-26T03:31:28.131Z","repository":{"id":242085925,"uuid":"370951047","full_name":"zhangt2333/actions-easyconnect","owner":"zhangt2333","description":"Github Actions: run code with EasyConnect VPN ! :sparkles:","archived":true,"fork":false,"pushed_at":"2021-07-18T12:19:39.000Z","size":15,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T21:59:21.711Z","etag":null,"topics":["actions","easyconnect","vpn"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhangt2333.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-26T07:50:42.000Z","updated_at":"2024-10-24T12:12:03.000Z","dependencies_parsed_at":"2024-05-31T16:03:06.134Z","dependency_job_id":null,"html_url":"https://github.com/zhangt2333/actions-easyconnect","commit_stats":null,"previous_names":["zhangt2333/actions-easyconnect"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangt2333%2Factions-easyconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangt2333%2Factions-easyconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangt2333%2Factions-easyconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangt2333%2Factions-easyconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhangt2333","download_url":"https://codeload.github.com/zhangt2333/actions-easyconnect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245584890,"owners_count":20639640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","easyconnect","vpn"],"created_at":"2024-07-31T15:01:04.866Z","updated_at":"2025-03-26T03:31:27.736Z","avatar_url":"https://github.com/zhangt2333.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# actions-easyconnect\nRun code within EasyConnect VPN !\n\n\n## Action inputs\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `CLI_OPTS` | VPN 的地址和账号密码，格式应符合 `-d {vpnUrl} -u {username} -p {password}` |  |\n| `SCRIPT`             | 要运行的代码                                                 |         |\n| `SLEEP_AFTER_LOGIN`  | 登录后等待的描述                                             | 5       |\n| `RETRY`              | 失败重试次数（比如 VPN 有时能连上有时不能，连上了没法用）    | 1       |\n| `EXPECTED_EXIT_CODE` | 可能期望的异常退出码，用于和程序网络连接失败的异常区分开     | 0       |\n\n## Usage\n\n举例（完整例子在 [zhangt2333/actions-SduElectricityReminder](https://github.com/zhangt2333/actions-SduElectricityReminder/blob/26d9c37a231f2bea89b2eb8117c0b0d2717a0f2e/.github/workflows/SduElectricityReminder.yml#L28-L38)，一个使用 [actions-easyconnect](https://github.com/zhangt2333/actions-easyconnect) 让校外服务器查询校内宿舍电量，低电提醒的 Github Actions）：\n\n```\n      - name: Run Spider in VPN\n        uses: zhangt2333/actions-easyconnect@main\n        with:\n          CLI_OPTS: ${{ secrets.CLI_OPTS }}\n          RETRY: 2\n          SLEEP_AFTER_LOGIN: 1\n          EXPECTED_EXIT_CODE: 66\n          SCRIPT: |\n            curl -m 3 --retry 3 -s -o /dev/null http://10.100.1.24:8988/web/Common/Tsm.html\n            python main.py\n```\n\n## Contribution\n\n* 欢迎使用，欢迎贡献代码！\n\n## Credits\n\n- https://github.com/Hagb/docker-easyconnect 提供 docker 封装的 easyconnect，本项目从中抽离出代码\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangt2333%2Factions-easyconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhangt2333%2Factions-easyconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangt2333%2Factions-easyconnect/lists"}