Update proxy.yml #2
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
name: Run Proxy GO | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
run-proxy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23.4' | |
- name: Install Dependencies | |
run: go mod tidy | |
- name: Run Proxy Server (Background) | |
run: | | |
go run proxy.go -p 1080 -f 22 & # Jalankan di background | |
echo $! > proxy_pid.txt # Simpan PID proses | |
- name: Wait for Proxy to Run | |
run: sleep 10 | |
- name: Stop Proxy Server | |
run: kill $(cat proxy_pid.txt) || echo "Process already stopped" |