Skip to content

Github action to validate minecraft data packs and function files.

License

Notifications You must be signed in to change notification settings

mcbeet/check-commands

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Check minecraft commands

GitHub release (latest SemVer) Discord

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

Usage

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

Examples

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

Contributing

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