Skip to content

chore: update GitHub workflows to trigger on specific file changes - #31

Merged
oleg-koval merged 6 commits into
betafrom
fix/release-2
Apr 5, 2026
Merged

chore: update GitHub workflows to trigger on specific file changes#31
oleg-koval merged 6 commits into
betafrom
fix/release-2

Conversation

@oleg-koval

@oleg-koval oleg-koval commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Added path filters to the CodeQL, Pages, Release, Scorecard, and Test workflows to ensure they only run when relevant Go source files and configuration files are modified. This improves efficiency by reducing unnecessary workflow runs.

Summary

  • Provide a short, high-level overview of what this PR changes (two sentences max).
  • Highlight which primary CLI flows, commands, or configuration paths the change touches.

Problem

  • Describe the user-facing or internal pain point you are addressing.
  • If the change fixes a bug, summarize the incorrect behavior or confusing output.

Solution

  • Outline how you solved the problem. Mention key packages, commands, or scripts that changed.
  • Call out notable updates to configuration, Docker handling, or release hooks.

Scope

  • List the affected subcommands, modules, or documentation areas (e.g., dcli docker clean, internal/git).
  • Indicate whether the change is limited to docs/tests, a single command, or spans multiple helpers.

Type of change

  • feat (new capability)
  • fix (bug fix)
  • docs (documentation only)
  • test (adds or changes tests)
  • chore (maintenance, tooling, CI)
  • other (describe in Summary)

Related issues

Validation

  • List commands you ran locally (e.g., make test, go test ./..., bin/dcli docker clean --dry-run).
  • Include links or filenames for logs if the validation spanned multiple platforms.

Screenshots / Demo

  • Paste representative terminal output, logs, or command snippets showing the new behavior.
  • If nothing visual changed, note N/A (screenshots are rare for CLI, but logs show the runtime effect).

Risk and impact

  • Describe deployment concerns (extra permissions, config migrations, update checks, etc.).
  • Call out performance, platform, or compatibility risks for Docker Compose and Git workflows.

Breaking changes

  • Explain any backward-incompatible behavior, config file changes, or new required flags.
  • If nothing breaks, write None.

Documentation

  • Note which docs/test plans were updated (e.g., docs/CONFIGURATION.md, TESTING_README.md).
  • Mention if you updated the README, CONtributing guide, or release notes.

Reviewer notes

  • Highlight manual verification steps, simplifications, or follow-up cleanup that reviewers should know.
  • Mention specific areas requiring additional scrutiny (self-updates, CI badges, config parsing).

Checklist

  • Tests pass locally (make test, go test ./..., etc.)
  • No additional lint or vet warnings in go test output
  • Documentation or docs site updated if behavior changed (e.g., docs/, README.md)
  • Changelog/Release notes entry added if the change ships in a release

Summary by CodeRabbit

  • Chores
    • Optimized CI/CD workflows to run only when relevant code or configuration files change, reducing unnecessary pipeline executions.
    • Updated build tooling configuration and upgraded GoReleaser action to the latest version with improved release handling.
    • Refined release process to trigger on main branch updates for more frequent and streamlined deployments.

Added a new section in CONTRIBUTING.md detailing the release process, including versioning format and triggering the Release workflow on merges to main. Updated release.yml to clarify version composition using the Version from cmd/root.go and short git SHA for unique artifact tagging.
Added path filters to the CodeQL, Pages, Release, Scorecard, and Test workflows to ensure they only run when relevant Go source files and configuration files are modified. This improves efficiency by reducing unnecessary workflow runs.
@coderabbitai

coderabbitai Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@oleg-koval has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 35 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 35 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1c73fb1e-1051-451e-ad68-ebbb6767a6f4

📥 Commits

Reviewing files that changed from the base of the PR and between c6a5562 and 2c709c8.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (15)
  • .github/workflows/codeql.yml
  • .github/workflows/release-prerelease.yml
  • .github/workflows/release.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/test.yml
  • .goreleaser.yml
  • CLAUDE.md
  • Makefile
  • README.md
  • docs/CONFIGURATION.md
  • docs/INSTALL.md
  • go.mod
  • internal/autoupdate/autoupdate.go
  • internal/autoupdate/runner_test.go
  • tools.go
📝 Walkthrough

Walkthrough

This pull request adds path-based filters to multiple GitHub Actions workflows to optimize pipeline execution, and upgrades GoReleaser configuration from version 1 to version 2 with corresponding action upgrade from v5 to v6.

Changes

Cohort / File(s) Summary
CI Workflow optimization
.github/workflows/codeql.yml, .github/workflows/scorecard.yml, .github/workflows/test.yml
Added paths filters to restrict execution to Go source files (**.go, go.mod, go.sum, Makefile, tools.go, .golangci.yml, .goreleaser.yml) and workflow files (.github/workflows/**).
Documentation Workflow optimization
.github/workflows/pages.yml
Added paths filter to restrict execution to documentation and asset changes (index.html, icon.svg, assets/**, and the workflow file itself).
Release workflow and GoReleaser upgrade
.github/workflows/release.yml, .goreleaser.yml
Changed release trigger from tag-based to every push to main; upgraded GoReleaser action from v5 to v6 with updated configuration parameters; updated .goreleaser.yml schema version from 1 to 2, changed builds: to ids:, format: to formats:, tap: block to repository: block with token, and skip: to disable: in changelog config.

Possibly related PRs

  • oleg-koval/dcli#27: Both PRs modify .github/workflows/test.yml—this PR adds path filters while the related PR updates golangci-lint versions.
  • oleg-koval/dcli#12: Both PRs modify release workflow and .goreleaser.yml configuration, updating GoReleaser action usage and triggering mechanism.
  • oleg-koval/dcli#1: Both PRs affect CI workflow and release configuration files, with this PR adjusting workflow triggers and GoReleaser settings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 Workflows now hop with purpose true,
Only running when there's work to do!
GoReleaser leaps to version two,
CI pipelines fresh—efficiency through and through!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description includes only a brief summary and the template structure, but lacks substantive content in required sections like Problem, Solution, Scope, Validation, and Reviewer notes. Complete the PR description by providing details for Problem (why workflows were running unnecessarily), Solution (which files were added/modified), Scope (affected workflows), Validation steps, Risk assessment, and Reviewer notes to ensure reviewers understand the full context.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: updating GitHub workflows to add path filters for specific file changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Bumped GoReleaser version to 2 in .goreleaser.yml and adjusted build configurations.
- Modified the release workflow to use GoReleaser v6 and updated environment variable handling.
- Removed path filters from the release trigger to ensure it runs on all merges to main.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/test.yml:
- Around line 3-26: The workflow's push/pull_request blocks currently include
path filters that can skip CI on branch-level events; remove the "paths" arrays
under both the 'push' and 'pull_request' keys so the workflow triggers on every
push and PR to branches [main, develop]; then ensure the 'test' job uses a Go
matrix targeting 1.25.0+ (update the go-version matrix entries to include
>=1.25.0) and configure the coverage upload step to use atomic mode for coverage
aggregation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49167d15-e85e-4380-a1dd-835a658370df

📥 Commits

Reviewing files that changed from the base of the PR and between d1746c3 and c6a5562.

📒 Files selected for processing (6)
  • .github/workflows/codeql.yml
  • .github/workflows/pages.yml
  • .github/workflows/release.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/test.yml
  • .goreleaser.yml

Comment thread .github/workflows/test.yml Outdated
Comment on lines +3 to +26
# Run only when Go sources, modules, or CI/release config change (skip doc-only / random YAML).
on:
push:
branches: [main, develop]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- 'tools.go'
- '.golangci.yml'
- '.goreleaser.yml'
- '.github/workflows/**'
pull_request:
branches: [main, develop]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- 'tools.go'
- '.golangci.yml'
- '.goreleaser.yml'
- '.github/workflows/**'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Path filters conflict with required branch-level test execution policy.

These filters can skip CI on main/develop pushes/PRs, which breaks the repo rule for this workflow.

Suggested fix
 on:
   push:
     branches: [main, develop]
-    paths:
-      - '**.go'
-      - 'go.mod'
-      - 'go.sum'
-      - 'Makefile'
-      - 'tools.go'
-      - '.golangci.yml'
-      - '.goreleaser.yml'
-      - '.github/workflows/**'
   pull_request:
     branches: [main, develop]
-    paths:
-      - '**.go'
-      - 'go.mod'
-      - 'go.sum'
-      - 'Makefile'
-      - 'tools.go'
-      - '.golangci.yml'
-      - '.goreleaser.yml'
-      - '.github/workflows/**'

As per coding guidelines, "Use GitHub Actions workflow (.github/workflows/test.yml) to run tests on push to main/develop and PR to main/develop, testing against Go 1.25.0+ and uploading coverage in atomic mode".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test.yml around lines 3 - 26, The workflow's
push/pull_request blocks currently include path filters that can skip CI on
branch-level events; remove the "paths" arrays under both the 'push' and
'pull_request' keys so the workflow triggers on every push and PR to branches
[main, develop]; then ensure the 'test' job uses a Go matrix targeting 1.25.0+
(update the go-version matrix entries to include >=1.25.0) and configure the
coverage upload step to use atomic mode for coverage aggregation.

- Introduced `DCLI_AUTO_UPDATE_CHANNEL` environment variable to allow users to specify which GitHub Releases channel to follow (stable, prerelease, beta, alpha).
- Updated the auto-update logic to fetch the latest release based on the selected channel.
- Adjusted documentation to reflect the new configuration options and their usage.
- Updated GitHub workflows to ensure compatibility with the new release channel feature.
- Modified the test workflow to run on every push and pull request to the main and develop branches, removing specific path filters for Go source files and configuration files.
- Added a format specification for coverage reporting in the test job.
@oleg-koval
oleg-koval changed the base branch from main to beta April 5, 2026 22:24
@oleg-koval
oleg-koval merged commit f7677a9 into beta Apr 5, 2026
5 checks passed
@oleg-koval
oleg-koval deleted the fix/release-2 branch April 5, 2026 22:24
oleg-koval added a commit that referenced this pull request Apr 5, 2026
#32)

* fix(release): update GitHub workflows to trigger on specific file changes (#31)

* fix: update CONTRIBUTING.md and release workflow

Added a new section in CONTRIBUTING.md detailing the release process, including versioning format and triggering the Release workflow on merges to main. Updated release.yml to clarify version composition using the Version from cmd/root.go and short git SHA for unique artifact tagging.

* chore: update GitHub workflows to trigger on specific file changes

Added path filters to the CodeQL, Pages, Release, Scorecard, and Test workflows to ensure they only run when relevant Go source files and configuration files are modified. This improves efficiency by reducing unnecessary workflow runs.

* chore: update GoReleaser configuration and GitHub workflow

- Bumped GoReleaser version to 2 in .goreleaser.yml and adjusted build configurations.
- Modified the release workflow to use GoReleaser v6 and updated environment variable handling.
- Removed path filters from the release trigger to ensure it runs on all merges to main.

* feat(auto-update): enhance release channel selection for auto-updates

- Introduced `DCLI_AUTO_UPDATE_CHANNEL` environment variable to allow users to specify which GitHub Releases channel to follow (stable, prerelease, beta, alpha).
- Updated the auto-update logic to fetch the latest release based on the selected channel.
- Adjusted documentation to reflect the new configuration options and their usage.
- Updated GitHub workflows to ensure compatibility with the new release channel feature.

* chore: update GitHub workflow to trigger on every push and pull request

- Modified the test workflow to run on every push and pull request to the main and develop branches, removing specific path filters for Go source files and configuration files.
- Added a format specification for coverage reporting in the test job.

* chore: update Go version in configuration and workflows to 1.26

- Bumped Go version from 1.25 to 1.26 in .golangci.yml and GitHub workflows to ensure compatibility with the latest features and improvements.

* chore: update golangci-lint version and increase timeout in release workflow

- Bumped golangci-lint version from v2.8.0 to v2.11.4 in the release workflow.
- Added a timeout argument of 5 minutes to the linter action to improve performance during linting.

* fix(release): update homebrew argument in release workflow
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.

1 participant