Skip to content

Latest commit

 

History

History
83 lines (68 loc) · 4.05 KB

README.md

File metadata and controls

83 lines (68 loc) · 4.05 KB

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