Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/funnyboy-roks/modrinth-auto-desc
Automatically update modrinth description from a file in the repository
https://github.com/funnyboy-roks/modrinth-auto-desc
data-pack hacktoberfest minecraft modrinth modrinth-api mods plugins resource-pack
Last synced: 1 day ago
JSON representation
Automatically update modrinth description from a file in the repository
- Host: GitHub
- URL: https://github.com/funnyboy-roks/modrinth-auto-desc
- Owner: funnyboy-roks
- License: apache-2.0
- Created: 2023-04-23T05:17:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-08T03:38:10.000Z (over 1 year ago)
- Last Synced: 2024-04-24T15:27:12.703Z (7 months ago)
- Topics: data-pack, hacktoberfest, minecraft, modrinth, modrinth-api, mods, plugins, resource-pack
- Language: JavaScript
- Homepage:
- Size: 354 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - funnyboy-roks/modrinth-auto-desc - auto-description)) - Automatically update Modrinth description and project settings from a GitHub repository (Project/version management tools / In-game)
README
# Modrinth Auto-Description
Automatically update the description for a Modrinth project from a markdown
file in the repo.## Links
In order to have images and links, you must use absolute urls, meaning
don't use `img.png`, use `https://example.com/img.png`.For GitHub paths, you can use `https://raw.githubusercontent.com////`.
## Front Matter
If your readme contains front matter (either yaml or json), you can send
additional data to the Modrinth API.All additional data can be found in the [Modrinth Docs](https://docs.modrinth.com/#tag/projects/operation/modifyProject).
*Note: The `body` key should not be specified and will be ignored if it is.*### Front Matter Format:
JSON:
```markdown
---
{
"modrinth": {
"source_url": "https://github.com/funnyboy-roks/mapify"
}
}
---
# Your content here...
```YAML:
```markdown
---
modrinth:
source_url: 'https://github.com/funnyboy-roks/mapify'
---
# Your content here...
```## Inputs
### `auth-token`
**Required**
The auth token to use for the Modrinth API
To get this, you need to:
1. Go to https://modrinth.com/settings/pats and sign in if you aren't already
1. Click "Create a PAT" in the top-left corner
1. Name it something that describes its purpose, i.e. "GitHub actions" or "Auto Description"
1. Under scopes, find "Write Projects" and make sure it's checked
1. Give it an expiration date -- Once this expiration date is reached, you'll need to generate a new token.
1. This is to ensure security. Anybody with this token could do harm to your project(s).
1. Press "Create PAT"
1. The PAT you just created should appear with some random numbers and letters, copy that
1. Put it in a [GitHub Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets)
1. You're done!### `slug`
**Required**
This is the URL, slug, or id of the Modrinth project.
### `readme`
**Optional**, default = `README.md`
The path to the readme to fetch from the root of the GitHub repo.
## Example Usage
```yaml
on:
push:
branches: [ main ]
jobs:
modrinth-desc:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: funnyboy-roks/[email protected]
with:
auth-token: ${{ secrets.MODRINTH_AUTH_TOKEN }}
slug: 'mapify'
```