A Github Action to automatically send a power action to a pterodactyl server
You can set up Pterodactyl to automatically pull from a git repository on restart. This action can be used to automatically restart a pterodactyl server when a new commit is pushed.
Please refer to this article for a guide on how to set up an action.
An example workflow for the scenario described above might look like this:
name: My Pterodactyl Restarter
on: [ push ]
jobs:
restart-server:
runs-on: ubuntu-latest
steps:
- name: restart
uses: outsparkled/pterodactyl-power-action@v0.1.0
with:
panel-url: 'https://panel.example.com'
server-id: ${{ secrets.SERVER_ID }}
bearer-token: ${{ secrets.BEARER_TOKEN }}
power-action: 'restart'
You should always use secrets to store your bearer token.
Required. The URL of the panel.
Required. The ID of the server you want to send a power action to.
Required. The bearer token to auth with, this will usually be your Pterodactyl API key. Use a secret to supply this value.
The power action to send. Defaults to 'restart'.
Feel free to open a pull request! Please run npm run build
before committing.