cl0versec / collie_tricker

使用长亭collie来trick github action获取一个为期最长6小时的国外主机

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collie Tricker

通过 GitHub Action 白嫖国外主机。

使用方式

  1. 注册百川-使用牧云主机管理助手

  1. 点击绑定主机

  1. 获取token

  1. 在github创建一个空的仓库,clone到本地,并创建.github/workflows/workflow.yml文件,写入一下参考内容:
name: example
on: [ push, pull_request ]

jobs:
  runner:
    runs-on: ubuntu-latest # 选择你想要的主机系统如:ubuntu:20.04
    steps:
      - uses: actions/checkout@v3
      - name: collie
        uses: dvkunion/collie_tricker@main
        with:
          token: xxxxxx  # your token,  It will be safer to use ${{ secrets.token }}, see [https://docs.github.com/actions/security-guides/encrypted-secrets] 
  1. git push 上去代码,触发action。

  2. 返回百川界面,已获取到主机。

  1. 后续使用时可以通过手动触发action的方式。

一些更有趣的玩法

一些更便捷的方式,如果需求的人多会逐步加入到demo。

  • 可以使用github action 的on:workflow_dispatch,通过http请求触发ci,来实现主机上线控制。
  • 也可以将token参数作为input。在每次http请求时动态带上token, 方便操作。

About

使用长亭collie来trick github action获取一个为期最长6小时的国外主机