chore: update GitHub workflows to trigger on specific file changes - #31
Conversation
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.
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThis 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
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
- 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.
There was a problem hiding this comment.
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
📒 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
| # 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/**' |
There was a problem hiding this comment.
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.
#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
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
Problem
Solution
Scope
dcli docker clean,internal/git).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
make test,go test ./...,bin/dcli docker clean --dry-run).Screenshots / Demo
N/A(screenshots are rare for CLI, but logs show the runtime effect).Risk and impact
Breaking changes
None.Documentation
docs/CONFIGURATION.md,TESTING_README.md).Reviewer notes
Checklist
make test,go test ./..., etc.)go testoutputdocs/,README.md)Summary by CodeRabbit