|
| 1 | +# Zenodo Metadata Validator 🛡️ |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +> 🚀 Ensure your metadata is ready for archiving! |
| 6 | +
|
| 7 | +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. ☁️ |
| 8 | + |
| 9 | +## 🛠️ How to use it in your Pipeline |
| 10 | + |
| 11 | +Add this sparkle to your `.github/workflows/validate.yml`: |
| 12 | + |
| 13 | +```yaml |
| 14 | +jobs: |
| 15 | + validate: |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - name: 📥 Checkout code |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - name: 🛡️ Validate Zenodo Metadata |
| 22 | + uses: vsoch/zenodo-validator@main |
| 23 | + with: |
| 24 | + path: '.zenodo.json' |
| 25 | +``` |
| 26 | +
|
| 27 | +
|
| 28 | +## 💻 Running it locally |
| 29 | +
|
| 30 | +> ...for the rebels 🎸 |
| 31 | +
|
| 32 | +Want to check your JSON before you even commit? Build the container and run it: |
| 33 | +
|
| 34 | +```bash |
| 35 | +# 🏗️ Build the magic box |
| 36 | +docker build -t zenodo-validator . |
| 37 | + |
| 38 | +# 🪄 Run the spell |
| 39 | +docker run --rm \ |
| 40 | + -v $(pwd):/github/workspace \ |
| 41 | + -e GITHUB_WORKSPACE=/github/workspace \ |
| 42 | + -e INPUT_PATH=.zenodo.json \ |
| 43 | + -e INPUT_SCHEMA_PATH=/schema.json \ |
| 44 | + -e INPUT_ERROR_FORMAT=text \ |
| 45 | + zenodo-validator |
| 46 | +``` |
| 47 | + |
| 48 | +The above also works with: |
| 49 | + |
| 50 | +```bash |
| 51 | +make |
| 52 | +make validate |
| 53 | +``` |
| 54 | + |
| 55 | +## 🎁 Inputs |
| 56 | + |
| 57 | +| Input | Description | Default | |
| 58 | +| :--- | :--- | :--- | |
| 59 | +| `path` 📍 | Where is your `.zenodo.json`? | `.zenodo.json` | |
| 60 | +| `error_format` 🎨 | `text`, `json`, or `pretty-json` | `text` | |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## 📄 License |
| 65 | + |
| 66 | + |
| 67 | +DevTools is distributed under the terms of the MIT license. |
| 68 | +All new contributions must be made under this license. |
| 69 | + |
| 70 | +See [LICENSE](https://github.com/converged-computing/cloud-select/blob/main/LICENSE), |
| 71 | +[COPYRIGHT](https://github.com/converged-computing/cloud-select/blob/main/COPYRIGHT), and |
| 72 | +[NOTICE](https://github.com/converged-computing/cloud-select/blob/main/NOTICE) for details. |
| 73 | + |
| 74 | +SPDX-License-Identifier: (MIT) |
| 75 | + |
| 76 | +LLNL-CODE- 842614 |
| 77 | + |
| 78 | +MIT. Go forth and do science! 🔬🧬🥂 |
| 79 | + |
| 80 | +**Maintained by [@vsoch](https://github.com/vsoch)** 🌟 |
0 commit comments