-
Notifications
You must be signed in to change notification settings - Fork 33
/
action.yml
36 lines (35 loc) · 1.45 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: 'DVKUnion/CollieTrickster'
description: 'Use Collie to get an free host'
author: 'DVK'
branding:
color: gray-dark
icon: heart
inputs:
global:
description: 'access collie via global endpoint'
default: true
token:
description: 'your collie token'
default: ''
host_type:
description: 'your host type like: linux/windows'
default: 'linux'
runs:
using: 'composite'
steps:
- name: register-linux
if: ${{ inputs.host_type == 'linux'}}
run: |
if [ "${{ inputs.global }}" == "true" ] ;then curl -kfsSL 'http://collie-agent-hk.chaitin.com:1443/api/v1/host/install_script?os_type=linux' | sudo bash -s -- --token=${{ inputs.token }};else curl -kfsSL 'http://collie-agent.chaitin.com:1443/api/v1/host/install_script?os_type=linux' | sudo bash -s -- --token=${{ inputs.token }}; fi
sleep 300
curl -kfsSL 'https://dvkunion.oss-cn-shanghai.aliyuncs.com/CollieTrickster/check.sh' | sudo bash -s
shell: bash
- name: register-windows
if: ${{ inputs.host_type == 'windows'}}
run: |
Invoke-WebRequest -Uri 'http://collie-agent.chaitin.com:1443/api/v1/lighter/installer?arch=x86_64&os_type=windows&token=${{ inputs.token }}' -OutFile "install.exe"
Start-Process .\install.exe
Set-ExecutionPolicy RemoteSigned -Force
Invoke-WebRequest -Uri 'https://dvkunion.oss-cn-shanghai.aliyuncs.com/Trickster/check.ps1' -OutFile "check.ps1"
.\check.ps1
shell: powershell