Improve the example systemd service file. #5
Workflow file for this run
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: Go | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Build | |
run: go build -v ./... | |
- name: Install go-mmproxy | |
run: | | |
sudo cp go-mmproxy /usr/bin/go-mmproxy | |
sudo mkdir /etc/go-mmproxy | |
echo 192.168.0.0/16 | sudo tee /etc/go-mmproxy/net-prefixes.txt | |
sudo cp go-mmproxy.service.example /etc/systemd/system/go-mmproxy.service | |
sudo systemctl daemon-reload | |
- name: Start go-mmproxy | |
run: sudo systemctl start go-mmproxy || sudo systemctl status go-mmproxy.service | |
- name: Check go-mmproxy status | |
run: systemctl is-active go-mmproxy |