Skip to content

feat: CSS centering + Docker Hub CI/CD and release automation - #2

Merged
clovisphere merged 3 commits into
devfrom
feat/enhancement
Jun 12, 2026
Merged

feat: CSS centering + Docker Hub CI/CD and release automation#2
clovisphere merged 3 commits into
devfrom
feat/enhancement

Conversation

@clovisphere

@clovisphere clovisphere commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Center game layout on all screen sizes (mobile & large desktop) using column flex + margin: auto on #app
  • Add docker.yml workflow: builds and pushes versioned image to Docker Hub on merges to main (tagged latest) and on semver tags (tagged v1.2.3, 1.2, 1)
  • Add release.yml workflow: runs release-please on every merge to main, opens a Release PR with auto-bumped version and CHANGELOG.md; merging it creates the git tag that triggers the Docker build
  • Seed package.json with version: 0.1.0 and add release-please config files

Release flow (after merge)

merge PR to main
  → release-please opens/updates a "chore: release vX.Y.Z" PR
     → merge the Release PR
        → git tag vX.Y.Z created
           → docker.yml triggers → image pushed to Docker Hub

Secrets required

Set these in GitHub repo → Settings → Secrets → Actions:

  • DOCKERHUB_USERNAME
  • DOCKERHUB_TOKEN

Test plan

  • Verify centering on desktop and mobile viewports
  • Confirm docker.yml triggers on a v*.*.* tag push and image appears on Docker Hub
  • Confirm release.yml opens a Release PR after merge to main

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Automated Docker image building and publishing to Docker Hub
    • Set up automated release management workflow
    • Configured project version tracking with initial version 0.1.0
  • Style

    • Improved game layout centering on all screen sizes

clovisphere and others added 2 commits June 12, 2026 06:40
Switch body to column flex with align-items center and use margin auto
on #app so the game is vertically centered on large screens while
gracefully falling back to top-aligned when content overflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docker.yml: builds and pushes versioned image to Docker Hub on pushes
  to main (latest) and on semver tags (v*.*.*) using docker/metadata-action
  for automatic tag generation and GHA layer caching
- release.yml: runs release-please on every merge to main, opens a
  Release PR with bumped version and CHANGELOG.md; merging it creates
  the git tag that triggers the Docker build
- Add release-please-config.json and .release-please-manifest.json
- Seed package.json with version 0.1.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@clovisphere, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 53 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4137edc0-68a3-4b59-8649-1fd0cb385dd2

📥 Commits

Reviewing files that changed from the base of the PR and between 0e0c8cc and 138335c.

📒 Files selected for processing (3)
  • .github/workflows/docker.yml
  • .github/workflows/release.yml
  • README.md
📝 Walkthrough

Walkthrough

This PR establishes release infrastructure and deployment automation for version 0.1.0, along with UI layout improvements. It configures release-please for semantic versioning, adds Docker and release workflows to GitHub Actions, and centers the game layout across all screen sizes.

Changes

Release Infrastructure and UI Layout

Layer / File(s) Summary
Release and versioning configuration
release-please-config.json, .release-please-manifest.json, package.json
Defines release-please Node configuration and root package mapping, and sets the initial package version to 0.1.0.
Docker and release automation workflows
.github/workflows/docker.yml, .github/workflows/release.yml
Adds Docker workflow to build and push images to Docker Hub on main branch and version tags; adds Release workflow to automate semantic versioning and release creation using release-please action.
Game layout centering and task completion
public/css/style.css, README.md
Centers game layout by switching body flex direction to column, centering items, and adding auto margin to app container; marks deployment and layout centering tasks complete in README TODO.

🎯 2 (Simple) | ⏱️ ~12 minutes

🐰 New workflows bloom, GitHub Actions spring,
Release-please sings of versions to bring,
Centered and ready, the game's balanced ground,
Docker and destiny spinning around!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: CSS centering for UI layout and Docker Hub CI/CD plus release automation workflows are the primary focus of this PR.
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.

✏️ 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 feat/enhancement

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.

@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: 4

🤖 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.yml:
- Around line 15-38: Workflow actions in .github/workflows/docker.yml and
.github/workflows/release.yml are using mutable tags (e.g., actions/checkout@v4,
docker/setup-buildx-action@v3, docker/login-action@v3,
docker/metadata-action@v5, docker/build-push-action@v6 and
googleapis/release-please-action@v4) which should be pinned to immutable commit
SHAs; update each `uses:` entry to reference the corresponding action's full
commit SHA (replace the `@v`* ref for actions/checkout,
docker/setup-buildx-action, docker/login-action, docker/metadata-action,
docker/build-push-action in docker.yml and googleapis/release-please-action in
release.yml) so the workflows use exact commits and do not float to new
releases.
- Line 15: The checkout step using actions/checkout@v4 is leaving repository
credentials persisted; update the checkout step in the Docker workflow to
disable persisted credentials by adding the with: persist-credentials: false
option for actions/checkout@v4 so the repo token is not written into the local
git config for later steps.

In @.github/workflows/release.yml:
- Around line 15-19: The release workflow uses
googleapis/release-please-action@v4 with token: ${{ secrets.GITHUB_TOKEN }},
which prevents tags it creates from triggering other push/tag workflows (like
your Docker workflow) and also uses an unpinned action; update the release
workflow to use a dedicated PAT or GitHub App token (with contents: write)
instead of GITHUB_TOKEN for the action's token input so generated tags will
trigger push/tag workflows, and pin googleapis/release-please-action to a
specific commit SHA rather than `@v4` to satisfy security scanning.

In `@README.md`:
- Line 86: The checklist entry that currently reads "[x] Deployment workflow
(GitHub Actions — build, push image, deploy)" overstates scope; change it to
accurately reflect only build-and-push (e.g., "Deployment workflow (GitHub
Actions — build & push image)" or "CI workflow (GitHub Actions — build and push
image)") and remove the checked mark so it no longer signals completion until a
true deploy step exists; update the line containing that exact checklist text
accordingly.
🪄 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: 6e3f732c-d6b5-4d19-a3ce-f4cac2dd1657

📥 Commits

Reviewing files that changed from the base of the PR and between 0e6fd72 and 0e0c8cc.

📒 Files selected for processing (7)
  • .github/workflows/docker.yml
  • .github/workflows/release.yml
  • .release-please-manifest.json
  • README.md
  • package.json
  • public/css/style.css
  • release-please-config.json

Comment thread .github/workflows/docker.yml Outdated
Comment thread .github/workflows/docker.yml Outdated
Comment on lines +15 to +38
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/blip
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# List workflows
echo "== Workflows =="
find .github/workflows -maxdepth 1 -type f -print

echo
echo "== docker.yml =="
nl -ba .github/workflows/docker.yml | sed -n '1,200p'

echo
echo "== release.yml (or similarly named) =="
for f in .github/workflows/release.yml .github/workflows/releases.yml .github/workflows/release*.yml; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    nl -ba "$f" | sed -n '1,220p'
  fi
done

echo
echo "== All uses: lines in workflow files =="
rg -n --no-heading "^\s*uses:\s*" .github/workflows -S || true

echo
echo "== Which uses: are not pinned to SHA (heuristic) =="
# Heuristic: detect uses@v* or uses@* without @<40-hex> or full SHA pin
rg -n --no-heading "^\s*uses:\s*[^@]+@([^\s]+)" .github/workflows -S | while read -r line; do
  file=$(echo "$line" | cut -d: -f1)
  lno=$(echo "$line" | cut -d: -f2)
  ref=$(echo "$line" | sed -E 's/.*@([^ ]+).*/\1/')
  # If ref looks like 40-hex SHA, skip
  if echo "$ref" | grep -Eq '^[0-9a-fA-F]{40}$'; then
    continue
  fi
  echo "$file:$lno uses@$ref"
done

Repository: clovisphere/blip

Length of output: 242


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== docker.yml =="
awk '{printf "%4d\t%s\n", NR, $0}' .github/workflows/docker.yml | sed -n '1,220p'

echo
echo "== release.yml =="
awk '{printf "%4d\t%s\n", NR, $0}' .github/workflows/release.yml | sed -n '1,260p'

echo
echo "== test.yml (not requested, but quick scan for other uses) =="
awk '{printf "%4d\t%s\n", NR, $0}' .github/workflows/test.yml | sed -n '1,220p'

echo
echo "== All uses: lines in workflow files =="
rg -n --no-heading "^\s*uses:\s*" .github/workflows -S || true

echo
echo "== Which uses: are not pinned to SHA (heuristic) =="
rg -n --no-heading "^\s*uses:\s*[^@]+@([^\s]+)" .github/workflows -S | while read -r line; do
  file=$(echo "$line" | cut -d: -f1)
  lno=$(echo "$line" | cut -d: -f2)
  ref=$(echo "$line" | sed -E 's/.*@([^ ]+).*/\1/')
  if echo "$ref" | grep -Eq '^[0-9a-fA-F]{40}$'; then
    continue
  fi
  echo "$file:$lno uses@$ref"
done

Repository: clovisphere/blip

Length of output: 2866


Pin GitHub Actions uses: entries to commit SHAs in .github/workflows/docker.yml and .github/workflows/release.yml. Both workflows use mutable @v* tags rather than immutable commit SHAs, including:

  • docker.yml: actions/checkout@v4, docker/setup-buildx-action@v3, docker/login-action@v3, docker/metadata-action@v5, docker/build-push-action@v6
  • release.yml: googleapis/release-please-action@v4
    Given these workflows build/release and may use tokens/credentials, SHA-pin every uses: reference.
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 15-15: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 15-15: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 21-21: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 28-28: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 38-38: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 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.yml around lines 15 - 38, Workflow actions in
.github/workflows/docker.yml and .github/workflows/release.yml are using mutable
tags (e.g., actions/checkout@v4, docker/setup-buildx-action@v3,
docker/login-action@v3, docker/metadata-action@v5, docker/build-push-action@v6
and googleapis/release-please-action@v4) which should be pinned to immutable
commit SHAs; update each `uses:` entry to reference the corresponding action's
full commit SHA (replace the `@v`* ref for actions/checkout,
docker/setup-buildx-action, docker/login-action, docker/metadata-action,
docker/build-push-action in docker.yml and googleapis/release-please-action in
release.yml) so the workflows use exact commits and do not float to new
releases.

Source: Linters/SAST tools

Comment thread .github/workflows/release.yml Outdated
Comment thread README.md Outdated
- Pin all action refs to immutable commit SHAs
- Add persist-credentials: false to checkout step in docker.yml
- Switch release.yml to use RELEASE_TOKEN (PAT) instead of GITHUB_TOKEN
  so release-please-created tags trigger the Docker workflow
- Correct README TODO wording (build & push, not deploy)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@clovisphere
clovisphere merged commit 86d9d91 into dev Jun 12, 2026
2 checks passed
@clovisphere
clovisphere deleted the feat/enhancement branch June 12, 2026 04:08
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