Skip to content

A reusable github action to upload your repository files to any number of Pterodactyl servers via the Pterodactyl API.

License

Notifications You must be signed in to change notification settings

zodtf/ptero-sync

Repository files navigation

ptero-sync

github action to upload your basefile repository contents into your pterodactyl.io server suite as specified.

by @zudsniper & ChatGPT

A GitHub Action that synchronizes files to one or more Pterodactyl game servers using the Pterodactyl API.

Release GitHub release (latest SemVer including pre-releases) GitHub commit activity GitHub
GitHub package.json version GitHub repo size Lines of code

Usage

To use this action in a workflow, include the following step:

- name: Sync to Pterodactyl game servers
  uses: zodtf/ptero-sync@v1
  with:
    api_key: ${{ secrets.PTERODACTYL_API_KEY }}
    ptero_url: ${{ secrets.PTERODACTYL_URL }}
    send_path: 'path/to/files'
    server_ids: '1,2,3'

This will upload all files within the path/to/files directory to the game servers with IDs 1, 2, and 3, using the API key and Pterodactyl URL specified in the GitHub repository secrets.

Inputs

NameRequiredDefaultDescription
api_keyYesNoneThe Pterodactyl API key
ptero_urlYesNoneThe Pterodactyl panel URL
send_pathYesNoneThe path of the files to send
server_idsYesNoneA comma-separated list of Pterodactyl server IDs to send files to

Examples

Sync files on Push

This workflow will synchronize files to the specified Pterodactyl game servers when code is pushed to the repository:

name: Sync to Pterodactyl game servers
on:
  push:
    branches:
      - main
jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Sync to Pterodactyl game servers
        uses: zodtf/ptero-sync@v1
        with:
          api_key: ${{ secrets.PTERODACTYL_API_KEY }}
          ptero_url: ${{ secrets.PTERODACTYL_URL }}
          send_path: 'path/to/files'
          server_ids: '1,2,3'

Sync files on tag

This workflow will synchronize files to the specified Pterodactyl game servers when a new tag is created:

name: Sync to Pterodactyl game servers
on:
  push:
    tags:
      - '*'
jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Sync to Pterodactyl game servers
        uses: zodtf/ptero-sync@v1
        with:
          api_key: ${{ secrets.PTERODACTYL_API_KEY }}
          ptero_url: ${{ secrets.PTERODACTYL_URL }}
          send_path: 'path/to/files'

zod.tf

Discord GitHub issue custom search GitHub followers

fullstack development, server administration, web design, branding creation, musical scoring, video editing, and idk another thing

second zod.tf logo

About

A reusable github action to upload your repository files to any number of Pterodactyl servers via the Pterodactyl API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published