Skip to content

GitHub Action to validate Zenodo JSON Metadata Files. ๐Ÿ›ก๏ธ

License

Notifications You must be signed in to change notification settings

vsoch/zenodo-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Zenodo Metadata Validator ๐Ÿ›ก๏ธ

img/zenodo-json-validator.png

๐Ÿš€ Ensure your metadata is ready for archiving!

This GitHub Action validates your .zenodo.json file against the official Zenodo schema. No more broken uploads or missing creator names! We've vendored the schema ๐Ÿ“ฆ here, and also allow you to provide your own. โ˜๏ธ

๐Ÿ› ๏ธ How to use it in your Pipeline

Add this sparkle to your .github/workflows/validate.yml:

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - name: ๐Ÿ“ฅ Checkout code
        uses: actions/checkout@v6

      - name: ๐Ÿ›ก๏ธ Validate Zenodo Metadata
        uses: vsoch/zenodo-validator@main 
        with:
          path: '.zenodo.json'

๐Ÿ’ป Running it locally

...for the rebels ๐ŸŽธ

Want to check your JSON before you even commit? Build the container and run it:

# ๐Ÿ—๏ธ Build the magic box
docker build -t zenodo-validator .

# ๐Ÿช„ Run the spell
docker run --rm \
  -v $(pwd):/github/workspace \
  -e GITHUB_WORKSPACE=/github/workspace \
  -e INPUT_PATH=.zenodo.json \
  -e INPUT_SCHEMA_PATH=/schema.json \
  -e INPUT_ERROR_FORMAT=text \
  zenodo-validator

The above also works with:

make
make validate

And you can also use the image provided: ghcr.io/vsoch/zenodo-validator.

๐ŸŽ Inputs

Input Description Default
path ๐Ÿ“ Where is your .zenodo.json? .zenodo.json
error_format ๐ŸŽจ text, json, or pretty-json text

๐Ÿ“„ License

DevTools is distributed under the terms of the MIT license. All new contributions must be made under this license.

See LICENSE, COPYRIGHT, and NOTICE for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614

MIT. Go forth and do science! ๐Ÿ”ฌ๐Ÿงฌ๐Ÿฅ‚

Maintained by @vsoch ๐ŸŒŸ

About

GitHub Action to validate Zenodo JSON Metadata Files. ๐Ÿ›ก๏ธ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •