Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d3oxy/pterodactyl-power
🚁 Send Power Actions to Pterodactyl Panel from Github Workflow
https://github.com/d3oxy/pterodactyl-power
Last synced: 5 days ago
JSON representation
🚁 Send Power Actions to Pterodactyl Panel from Github Workflow
- Host: GitHub
- URL: https://github.com/d3oxy/pterodactyl-power
- Owner: D3OXY
- License: mit
- Created: 2023-09-01T05:56:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-01T07:53:07.000Z (over 1 year ago)
- Last Synced: 2024-12-01T13:02:02.095Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 113 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pterodactyl Power - GitHub Action
This GitHub Action allows you to send power actions to a Pterodactyl panel server. You can start, stop, restart, or kill the server using this action.
## Usage
To use this GitHub Action in your workflow, you can add the following YAML configuration to your workflow file (e.g., `.github/workflows/power-action.yml`).
```yaml
name: Power Action Workflowon:
push:
branches:
- main # Replace with your desired branchjobs:
power_action:
name: Send Power Action to Pterodactyl Server
runs-on: ubuntu-latest
steps:
- name: Execute Pterodactyl Power Action
uses: D3OXY/pterodactyl-power@V1
with:
PANEL_URL: "https://your-panel-url.com"
API_KEY: ${{ secrets.PTERODACTYL_API_KEY }}
SERVER_ID: ${{ secrets.PTERODACTYL_SERVER_ID }}
POWER_ACTION: "START" # You can change this to "STOP," "RESTART," or "KILL" as needed
```Ensure that you have the necessary secrets (`API_KEY`, `SERVER_ID`, and optionally `PANEL_URL`) defined in your repository's settings.
## Inputs
- `PANEL_URL` (required): The URL of your Pterodactyl panel.
- `API_KEY` (required): The bearer token used to authorize with the Pterodactyl panel get it from `https://your-panel-url/account/api`.
- `SERVER_ID` (required): The ID of the server on which you want to perform the power action.
- `POWER_ACTION` (optional, default: "restart"): The power action to be executed. It should be one of the following: "start," "stop," "restart," or "kill."## Example
Here's an example of how to use this action in a workflow:
```yaml
name: Power Action Workflowon:
push:
branches:
- mainjobs:
power_action:
name: Send Power Action to Pterodactyl Server
runs-on: ubuntu-latest
steps:
- name: Execute Pterodactyl Power Action
uses: d3oxy/pterodactyl-power@V1
with:
PANEL_URL: "https://panel.deoxy.dev"
API_KEY: ${{ secrets.PTERODACTYL_API_KEY }}
SERVER_ID: ${{ secrets.PTERODACTYL_SERVER_ID }}
POWER_ACTION: "restart" # You can change this to "start," "restart," or "kill" as needed
```Made with 💙 by [d3oxy](https://deoxy.dev)