Skip to content

DP RP | Fixes

DP RP | Fixes #240

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build Pack(s)
# Controls when the workflow will run - only when modifying pack or pushing changes etc
on:
push:
branches:
- main
paths:
- 'main/**'
- 'sharders/**'
- 'cosmetics/**'
- 'jumpscares/**'
# 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:
# Check the main folder for .json syntax / overall errors
validate_main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Files - Main
run: |
cd main
for file in $(find . -type f -name "*.json"); do
jq empty "$file" >/dev/null || (echo "Error in JSON file: $file" && exit 1)
done
# Check the sharders folder for .json syntax / overall errors
validate_sharders:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Files - Sharders
run: |
cd sharders
for file in $(find . -type f -name "*.json"); do
jq empty "$file" >/dev/null || (echo "Error in JSON file: $file" && exit 1)
done
# Check the custom folder for .json syntax / overall errors
validate_custom:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/txt-testing'
steps:
- uses: actions/checkout@v4
- name: Validate JSON Files - Testing
run: |
cd custom
for file in $(find . -type f -name "*.json"); do
jq empty "$file" >/dev/null || (echo "Error in JSON file: $file" && exit 1)
done
# Check the cosmetics folder for .json syntax / overall errors
validate_cosmetics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Files - Cosmetics
run: |
cd cosmetics
for file in $(find . -type f -name "*.json"); do
jq empty "$file" >/dev/null || (echo "Error in JSON file: $file" && exit 1)
done
# Check the cosmetics folder for .json syntax / overall errors
validate_jumpscares:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Files - Cosmetics
run: |
cd jumpscares
for file in $(find . -type f -name "*.json"); do
jq empty "$file" >/dev/null || (echo "Error in JSON file: $file" && exit 1)
done
# -----------------------------------------
# Build pack
# -----------------------------------------
# Build the root pack
build_main:
runs-on: ubuntu-latest
needs: [validate_main]
# 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 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 main
zip -r ../nikosnextbots_pack.zip *
- name: Upload to Host
run: |
mc cp nikosnextbots_pack.zip myminio/nnb/
# Build the sharders pack
build_sharders:
runs-on: ubuntu-latest
needs: [validate_sharders]
# 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 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 sharders
zip -r ../nikosnextbots_sharders.zip *
- name: Upload to Host
run: |
mc cp nikosnextbots_sharders.zip myminio/nnb/
# Build the cosmetics pack
build_cosmetics:
runs-on: ubuntu-latest
needs: [validate_cosmetics]
# 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 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 cosmetics
zip -r ../nikosnextbots_cosmetics.zip *
- name: Upload to Host
run: |
mc cp nikosnextbots_cosmetics.zip myminio/nnb/
# Build the jumpscares pack
build_jumpscares:
runs-on: ubuntu-latest
needs: [validate_jumpscares]
# 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 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 jumpscares
zip -r ../nikosnextbots_jumpscares.zip *
- name: Upload to Host
run: |
mc cp nikosnextbots_jumpscares.zip myminio/nnb/
# Custom texture pack - contains experimental changes / latest chagnes from txt-testing branch.
build_custom:
runs-on: ubuntu-latest
needs: [validate_custom]
if: github.ref == 'refs/heads/txt-testing'
# 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 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
zip -r ../nikosnextbots_custom.zip *
# For now testing pack will be not uploaded to the host.
# - name: Upload to Host
# run: |
# mc cp nikosnextbots_custom.zip myminio/nnb/
- uses: actions/upload-artifact@v4
with:
name: untested_custom_pack
path: nikosnextbots_custom.zip
push_texturepack:
runs-on: ubuntu-latest
needs: [build_main, build_sharders, build_cosmetics, build_jumpscares]
# 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"
- name: Send notify to all servers
# Arcade
run: |
mcrcon -H ${{ secrets.ARCADE_RCON_IP }} -P ${{ secrets.ARCADE_RCON_PORT }} -p ${{ secrets.ARCADE_RCON_PASSWORD }} <<EOF
tellraw @a {"text":"Texturepack has been updated! Please rejoin to see new stuff!","color":"red"}
EOF