check-version action automatically checks for upstream version updates and optionally creates pull requests with the changes.
Overview
This action:- Scans all apps in your repository
- Checks for version updates based on
checkverconfiguration - Updates
meta.jsonfiles when new versions are found - Optionally creates pull requests with the changes
- Generates detailed summary reports
Usage
Basic Setup
.github/workflows/check-version.yaml
With Auto PR Creation
Manual Trigger for Specific App
Inputs
GitHub token for repository access.
- Use
GITHUB_TOKENfor read-only checks - Use Personal Access Token (PAT) for creating PRs
App context to check. Use
all to check all apps.Examples:all- Check all appsapps/icones- Check only icones appbase/nginx- Check only nginx base image
Control PR creation behavior:
'true'- Create PR to main/master branch'false'- No PR (dry run)'development'- Create PR to development branch
Number of apps to check concurrently. Controls parallelism.
Enable debug logging.
Log output format for debugging.
simple- Minimal outputdetailed- Verbose loggingjson- JSON formatted logs
Outputs
The action provides outputs in the GitHub Actions summary:Summary Report
Complete Example
.github/workflows/check-version.yaml
How It Works
1. Scan Apps
Scans the repository for apps withmeta.json files:
apps/*/meta.jsonbase/*/meta.jsonsync/*/meta.jsontest/*/meta.json
2. Version Checking
For each app variant:- Reads
checkverconfiguration - Clones/updates upstream repository (cached in
.git-cache) - Extracts version based on
checkver.type:- version: Read from file (package.json, VERSION, etc.)
- tag: Get latest matching Git tag
- sha: Get latest commit SHA
- manual: Compare with previous commit
- Compares with current
versionandshain meta.json
3. Update Detection
Marks app as outdated if:- Version string changed
- OR commit SHA changed
4. File Updates
When updates are found:- Updates
meta.jsonwith new version and SHA - Processes files listed in
checkver.processFileswith placeholder replacement - Collects commit information from upstream
5. PR Creation
Ifcreate_pr is enabled:
- Creates a new branch:
update/{app-name}-{timestamp} - Commits changes with descriptive message
- Creates pull request with:
- Title: “Update to ”
- Detailed changelog from upstream commits
- Links to upstream repository
Caching
The action uses Git repository caching to speed up subsequent runs:.git-cache/ directory.
Permissions
Read-only (no PR)
With PR creation
Triggers
Scheduled Checks
- Every 2 hours:
'0 */2 * * *' - Every 6 hours:
'0 */6 * * *' - Daily at midnight:
'0 0 * * *' - Weekly on Monday:
'0 0 * * 1'
On Push
Manual Dispatch
Skip Checks
Add[skip check] to commit messages to skip version checking:
Best Practices
-
Use caching to speed up runs:
-
Set appropriate check frequency:
- Stable apps: Check daily or weekly
- Development branches: Check every few hours
- Use
checkFrequencyin meta.json to control per-app
-
Use PAT for PR creation:
-
Enable debug for troubleshooting:
-
Review PRs before merging:
- Check changelog
- Verify version bump is correct
- Test build if needed
Troubleshooting
No updates detected
- Verify
checkverconfiguration is correct - Check if upstream has new commits/tags
- Enable
debug: truefor detailed logs - Verify repository URL is accessible
PR creation fails
- Ensure using PAT with
reposcope - Check
pull-requests: writepermission is set - Verify branch name doesn’t already exist
Cache issues
- Clear cache manually from Actions UI
- Update cache key if meta.json structure changed
- Check
.git-cachedirectory size
Related
- Checkver Types - Version checking strategies
- Meta Schema - Configuration reference
- Resolve Meta Action - Build metadata resolution