Github action to validate minecraft data packs and function files.
# .github/workflows/check-commands.yml
name: Check commands
on: [push]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mcbeet/check-commands@v1
with:
source: path/to/my_data_pack
This github action installs mecha
in an isolated virtualenv and checks your data pack and function files for errors. The inputs of the action reflect the mecha
command-line options. Only the source
input is required.
Input | Optional | Description |
---|---|---|
version |
defaults to latest |
The version of mecha to install |
source |
required | The list of data packs, functions files or folders to validate |
minecraft |
defaults to 1.19 |
The version of minecraft to use for checking commands |
stats |
defaults to false |
Whether to output statistics |
log |
defaults to WARNING |
The output log level |
Check a data pack when the pack.mcmeta
file is at the root of the repository.
- uses: mcbeet/check-commands@v1
with:
source: .
Check a data pack located in the src
directory.
- uses: mcbeet/check-commands@v1
with:
source: src
Check individual function files.
- uses: mcbeet/check-commands@v1
with:
source: foo.mcfunction bar.mcfunction
Check a data pack at the root of the repository with an explicit minecraft version.
- uses: mcbeet/check-commands@v1
with:
source: .
minecraft: "1.18"
Check a data pack at the root of the repository and output statistics.
- uses: mcbeet/check-commands@v1
with:
source: .
stats: true
Contributions are welcome. Make sure to first open an issue discussing the problem or the new feature before creating a pull request. If you find a bug please try to share a link to the problematic action run.
License - MIT