README.md
SA-MP Server Workflow with Ngrok
This GitHub Actions workflow sets up an SA-MP server and exposes it to the internet using Ngrok.
Usage
- Fork this repository
- Create an account on ngrok.com and get an auth token
- Go to the "Settings" tab of your forked repository and add the following secrets:
NGROK_AUTH_TOKEN: Your Ngrok auth tokenGIT_USERNAME: Your GitHub usernameGIT_PAT: A personal access token with permission to push to your forked repository
- Modify
samp03svr/server.cfgto your liking - Commit and push the changes to your forked repository
- Go to the "Actions" tab of your forked repository and click the "SA-MP Server Workflow with Ngrok" workflow
- Click the "Run workflow" button
- Wait for the workflow to finish running (this may take a while)
Workflow
This workflow consists of three jobs:
install-ngrok: Downloads and installs Ngroksamp-server: Starts the SA-MP server and exposes it to the internet using Ngroksave-and-push: Saves any changes made during the workflow and pushes them to the forked repository
Workflow Configuration
The workflow is triggered by a workflow_dispatch event on the main branch of the repository. You can also trigger the workflow manually from the "Actions" tab of your forked repository.
The workflow uses the ubuntu-latest runner.
The samp-server job requires the following environment variables to be set:
NGROK_AUTH_TOKEN: Your Ngrok auth tokenGIT_PAT: A personal access token with permission to push to your forked repository
The samp-server job performs the following steps:
- Checks out the repository
- Downloads and installs Ngrok
- Starts Ngrok and exposes port 7777 on the internet
- Gets the public URL of the Ngrok tunnel
- Starts the SA-MP server with the Ngrok URL as the server IP
- Runs the SA-MP server for 2 hours
- Stops the SA-MP server and Ngrok
The save-and-push job performs the following steps:
- Checks out the repository
- Saves any changes made during the workflow
- Commits and pushes the changes to the forked repository
The workflow uses Ubuntu as the operating system for the jobs, so you will need to ensure that your SA:MP server files are compatible with Ubuntu.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью