Skip to content

Build Custom Bots

Build Custom Bots #38

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build Custom Bots
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "txt-main" branch
repository_dispatch:
types: [ "build-bot" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the pack
build_pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Files
run: |
curl -L https://nikostuff.com/wp-content/nextbots_png/bot.png -o custom_bots/assets/userbots/textures/bot/bot.png
curl -L https://nikostuff.com/wp-content/nextbots_s/custom_s.ogg -o custom_bots/assets/userbots/sounds/custom_s.ogg
curl -L https://nikostuff.com/wp-content/nextbots_j/custom_j.ogg -o custom_bots/assets/userbots/sounds/custom_j.ogg
- name: Setup MinIO
run: |
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/
- name: Set Up MinIO Configuration
run: |
mc alias set myminio https://mcapi.nikostuff.com/ "${{ secrets.MINIO_ACCESS_KEY }}" "${{ secrets.MINIO_SECRET_KEY }}"
- name: Prepare File
run: |
cd custom_bots
zip -r ../nikosnextbots_custom_bots.zip *
- name: Upload to Host
run: |
mc cp nikosnextbots_custom_bots.zip myminio/nnb/
push_texturepack:
runs-on: ubuntu-latest
needs: [build_pack]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup RCON connection
run: |
sudo apt-get install build-essential
git clone https://github.com/Tiiffi/mcrcon.git
cd mcrcon
make
sudo make install
- name: Import Texturepack
run: mcrcon -H ${{ secrets.RCON_IP }} -P ${{ secrets.RCON_PORT }} -p ${{ secrets.RCON_PASSWORD }} "forcepack reload"