CheckMarketplaceMetadata
The CheckMarketplaceMetadata job template validates an action’s metadata file against the rules
GitHub Marketplace applies when an action is listed.
The Marketplace checks this metadata only at publish time, in a web form, and rejects it without much explanation. This template applies the same rules on every push, so a defect is a red pipeline on the development branch rather than a rejection months later.
Note
Publishing itself is not automated, because there is no API for it: an action is listed by ticking Publish this Action to the GitHub Marketplace while drafting or editing its release.
A tag carries exactly one release, and the Marketplace listing is a property of that release rather than a second one - so an already-published release is edited, not re-created. Drafting a new release for a tag that has one fails with “Duplicate tag name - This tag already has release notes.”
Instantiation
The job needs no parameters when the metadata file is the conventional action.yml at the repository root. Making
the release jobs depend on it keeps a release from being tagged with metadata the Marketplace would reject.
jobs:
CheckMarketplace:
uses: pyTooling/Actions/.github/workflows/CheckMarketplaceMetadata.yml@r8
# Other pipeline jobs
TriggerTaggedRelease:
uses: pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@r8
needs:
- Prepare
- CheckMarketplace
if: needs.Prepare.outputs.is_release_commit == 'true'
permissions:
contents: write
actions: write
with:
version: ${{ needs.Prepare.outputs.version }}
auto_tag: ${{ needs.Prepare.outputs.is_release_commit }}
secrets: inherit
Parameter Summary
Goto input parameters
Parameter Name |
Required |
Type |
Default |
|---|---|---|---|
no |
string |
|
|
no |
string |
|
|
no |
string |
|
|
no |
number |
|
Goto secrets
This job template needs no secrets.
Goto output parameters
This job template has no output parameters.
Input Parameters
ubuntu_image
- Type:
string
- Required:
no
- Default Value:
'ubuntu-26.04'- Possible Values:
See actions/runner-images - Available Images for available Ubuntu image versions.
- Description:
Name of the Ubuntu image used to run this job.
python_version
- Type:
string
- Required:
no
- Default Value:
'3.14'- Possible Values:
Any Python version supported by GitHub: actions/setup-python.
- Description:
Python version used to read and check the metadata file.
action_file
- Type:
string
- Required:
no
- Default Value:
'action.yml'- Possible Values:
'action.yml'or'action.yaml'.- Description:
Action metadata file. GitHub Marketplace requires it at the repository root, so a path pointing elsewhere is reported as a violated rule rather than checked.
description_limit
- Type:
number
- Required:
no
- Default Value:
125- Possible Values:
A positive number.
- Description:
Maximum length of the action’s description, exclusive. The Marketplace form rejects a longer description with “Description must be less than 125 characters.”, so a description of exactly this length is already too long.
Secrets
This job template needs no secrets.
Outputs
This job template has no output parameters.
Optimizations
Every rule is evaluated before the job fails, so one run reports all violations instead of one per pipeline run.