Skip to content

Update workflow triggers for main -> master branch rename#1

Merged
tomcasaburi merged 2 commits into
masterfrom
update-workflow-branch-triggers
Jul 9, 2026
Merged

Update workflow triggers for main -> master branch rename#1
tomcasaburi merged 2 commits into
masterfrom
update-workflow-branch-triggers

Conversation

@tomcasaburi

@tomcasaburi tomcasaburi commented Jul 9, 2026

Copy link
Copy Markdown
Member

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 main to master, push and pull_request triggers in the Rust build/test, rust-clippy, Docker PR test, and Docker publish workflows now target master so CI, linting, image builds, and GHCR publishing keep running.

docker-publish.yml also adds a deploy job that runs only on pushes to master (after build-and-push): it uses DEPLOY_SSH_KEY and DEPLOY_HOST to SSH to the VPS and run the restricted deploy command 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

  • Chores
    • Updated automated build, test, lint, and publish workflows to run on the master branch.
    • Both push and pull request triggers now follow the new default branch, helping CI/CD continue to work smoothly.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Four 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.

Changes

CI Branch Trigger Update

Layer / File(s) Summary
Branch filter change to master
.github/workflows/docker-build-run-test.yml, .github/workflows/docker-publish.yml, .github/workflows/rust-clippy.yml, .github/workflows/rust.yml
Push and pull_request trigger branch filters updated from "main" to "master" across all four workflow files.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the branch rename and the workflow trigger updates in the changed files.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-workflow-branch-triggers

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.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d2353f5 and 08d003f.

📒 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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 -20

Repository: 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.md

Repository: 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.md

Repository: 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" ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.md

Repository: 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.

@tomcasaburi tomcasaburi merged commit f82268e into master Jul 9, 2026
6 checks passed
@tomcasaburi tomcasaburi deleted the update-workflow-branch-triggers branch July 9, 2026 09:18
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