Skip to content

A Github Action to automatically send a power action to a pterodactyl server

License

Notifications You must be signed in to change notification settings

outsparkled/pterodactyl-power-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pterodactyl-power-action

A Github Action to automatically send a power action to a pterodactyl server

What is this useful for?

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.

How can I use this?

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.

Inputs

panel-url

Required. The URL of the panel.

server-id

Required. The ID of the server you want to send a power action to.

bearer-token

Required. The bearer token to auth with, this will usually be your Pterodactyl API key. Use a secret to supply this value.

power-action

The power action to send. Defaults to 'restart'.

Contributing

Feel free to open a pull request! Please run npm run build before committing.

About

A Github Action to automatically send a power action to a pterodactyl server

Resources

License

Stars

Watchers

Forks

Packages

No packages published