Add auto-tag daily version bump workflow - #374
Conversation
Runs daily at 14:00 UTC (~17:00 Tel Aviv). Bumps MODULE_VERSION build number in d4xx.c and creates annotated tag when meaningful changes exist on dev since the last tag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds the auto-tag workflow to the master branch to enable GitHub Actions scheduled cron and workflow_dispatch triggers, which only function from the default branch. The workflow itself operates on the dev branch, automatically bumping the build version number in MODULE_VERSION and creating corresponding git tags when meaningful code changes are detected.
Changes:
- Adds GitHub Actions workflow that runs daily at 14:00 UTC to automatically increment the build number (4th component) of MODULE_VERSION in
kernel/realsense/d4xx.c - Workflow includes smart filtering to skip version bumps for changes in non-code directories (.github/, test/, docs/, scripts/, etc.)
- Implements comprehensive validation and error handling with branch guards, change detection, and post-update verification
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| id: bump | ||
| run: | | ||
| current="${{ steps.version.outputs.current }}" | ||
| IFS='.' read -r major minor patch build <<< "$current" |
There was a problem hiding this comment.
The version parsing and increment logic has two potential robustness issues: (1) The IFS read assumes exactly 4 dot-separated components but doesn't validate this - if MODULE_VERSION has fewer or more components, variables could be empty or truncated silently. (2) The arithmetic expansion $((build + 1)) will fail if the build component is non-numeric. Consider adding validation: if [[ -z "$major" || -z "$minor" || -z "$patch" || -z "$build" ]]; then echo "::error::Version must have exactly 4 components"; exit 1; fi and if ! [[ "$build" =~ ^[0-9]+$ ]]; then echo "::error::Build number must be numeric"; exit 1; fi
| IFS='.' read -r major minor patch build <<< "$current" | |
| IFS='.' read -r major minor patch build <<< "$current" | |
| if [[ -z "$major" || -z "$minor" || -z "$patch" || -z "$build" ]]; then | |
| echo "::error::Version must have exactly 4 components" | |
| exit 1 | |
| fi | |
| # Ensure there are no extra components beyond major.minor.patch.build | |
| if [[ "$build" == *.* ]]; then | |
| echo "::error::Version must have exactly 4 components" | |
| exit 1 | |
| fi | |
| if ! [[ "$build" =~ ^[0-9]+$ ]]; then | |
| echo "::error::Build number must be numeric" | |
| exit 1 | |
| fi |
Summary
masterso the scheduled cron andworkflow_dispatchtriggers work (GitHub only runs these from the default branch)dev— this PR just makes it discoverable by GitHub ActionsContext
devvia PR Add auto-tag daily version bump workflow #372 and Ignore scripts/, CLAUDE.md, .gitignore in auto-tag filter #373masterfor schedule/dispatch to function🤖 Generated with Claude Code