Update workflow triggers for main -> master branch rename#1
Conversation
📝 WalkthroughWalkthroughFour GitHub Actions workflow files (docker-build-run-test.yml, docker-publish.yml, rust-clippy.yml, rust.yml) had their branch trigger filters changed from "main" to "master" for push and/or pull_request events. No other configuration or job logic was modified. ChangesCI Branch Trigger Update
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/docker-build-run-test.yml:
- Line 6: The branch filter examples are inconsistent with the workflow trigger
because the workflow uses master while the documentation still shows main.
Update the branch-filtering example in the README to match the
docker-build-run-test workflow’s master-only behavior, keeping the branch
reference consistent with the existing workflow trigger and related example
text.
In @.github/workflows/docker-publish.yml:
- Line 5: The Docker publish workflow trigger and the README are out of sync:
the workflow is configured in the publish job for the master branch, but the
docs still mention main. Update the Docker publishing documentation in README.md
to match the actual branch name used by the workflow trigger, and keep the
workflow reference aligned with the branch selector in the docker-publish job.
🪄 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: cf91752c-9a97-4188-a358-2eae81e472f2
📒 Files selected for processing (4)
.github/workflows/docker-build-run-test.yml.github/workflows/docker-publish.yml.github/workflows/rust-clippy.yml.github/workflows/rust.yml
| pull_request: | ||
| branches: | ||
| - main | ||
| - master |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check README for stale references to "main" branch
rg -n 'main' README.md | head -20Repository: bitsocialnet/bitsocial-github-alerts
Length of output: 511
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the relevant workflow and README sections with line numbers.
printf '\n## workflow\n'
cat -n .github/workflows/docker-build-run-test.yml | sed -n '1,80p'
printf '\n## README excerpt\n'
cat -n README.md | sed -n '1,120p'Repository: bitsocialnet/bitsocial-github-alerts
Length of output: 6274
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find all branch references in the repo to see whether README is the outlier.
rg -n '\b(main|master)\b' -g '!*node_modules*' -g '!*.lock' .Repository: bitsocialnet/bitsocial-github-alerts
Length of output: 3606
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the README section around the branch-filtering docs.
sed -n '20,40p' README.md
printf '\n## branch refs in README\n'
rg -n 'branch=main|main,release/\*|Only main|master' README.mdRepository: bitsocialnet/bitsocial-github-alerts
Length of output: 951
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show whether the workflow itself uses master or main elsewhere.
rg -n '\b(master|main)\b' .github/workflows/docker-build-run-test.yml README.mdRepository: bitsocialnet/bitsocial-github-alerts
Length of output: 622
Update the branch-filtering examples to master.
README.md:25-29 still shows branch=main, but the workflow only runs on master PRs.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/docker-build-run-test.yml at line 6, The branch filter
examples are inconsistent with the workflow trigger because the workflow uses
master while the documentation still shows main. Update the branch-filtering
example in the README to match the docker-build-run-test workflow’s master-only
behavior, keeping the branch reference consistent with the existing workflow
trigger and related example text.
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| branches: [ "master" ] |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check README for stale "push to main" references in Docker section
rg -n 'push.*main' README.mdRepository: bitsocialnet/bitsocial-github-alerts
Length of output: 251
Update the Docker publishing docs to match the workflow trigger. README.md:80 still says images are published on every push to main, but the workflow now triggers on master.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/docker-publish.yml at line 5, The Docker publish workflow
trigger and the README are out of sync: the workflow is configured in the
publish job for the master branch, but the docs still mention main. Update the
Docker publishing documentation in README.md to match the actual branch name
used by the workflow trigger, and keep the workflow reference aligned with the
branch selector in the docker-publish job.
The default branch was renamed from main to master. The four workflow files still triggered on pushes/PRs to main, so CI, clippy, the Docker build test, and GHCR publishing would silently stop running. This updates all branch triggers to master.
No Docker tag changes needed: the latest tag is gated on {{is_default_branch}} (name-agnostic) and deploy/docker-compose.yml pulls :latest.
Note
Medium Risk
Automated production redeploy over SSH on every master push is operationally sensitive; branch trigger updates are low risk but prevent silent CI gaps if misconfigured.
Overview
After the default branch rename from
maintomaster, push and pull_request triggers in the Rust build/test, rust-clippy, Docker PR test, and Docker publish workflows now targetmasterso CI, linting, image builds, and GHCR publishing keep running.docker-publish.ymlalso adds adeployjob that runs only on pushes tomaster(afterbuild-and-push): it usesDEPLOY_SSH_KEYandDEPLOY_HOSTto SSH to the VPS and run the restricteddeploycommand for redeploy.Reviewed by Cursor Bugbot for commit 79e1459. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
masterbranch.