Skip to content

Add auto-tag daily version bump workflow - #374

Merged
ymodlin merged 1 commit into
masterfrom
ci/auto-tag-master
Feb 20, 2026
Merged

Add auto-tag daily version bump workflow#374
ymodlin merged 1 commit into
masterfrom
ci/auto-tag-master

Conversation

@ymodlin

@ymodlin ymodlin commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the auto-tag workflow to master so the scheduled cron and workflow_dispatch triggers work (GitHub only runs these from the default branch)
  • The workflow itself checks out and pushes to dev — this PR just makes it discoverable by GitHub Actions

Context

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings February 20, 2026 12:22
@ymodlin
ymodlin merged commit 71dfa59 into master Feb 20, 2026
12 checks passed
@ymodlin
ymodlin deleted the ci/auto-tag-master branch February 20, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
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

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants