Skip to content

Update registry credentials and secret references in CI/CD pipeline - #83

Merged
omarghatasheh merged 2 commits into
mainfrom
cdicd-patches-1
Mar 31, 2026
Merged

Update registry credentials and secret references in CI/CD pipeline#83
omarghatasheh merged 2 commits into
mainfrom
cdicd-patches-1

Conversation

@MusaMisto

@MusaMisto MusaMisto commented Mar 31, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow authentication to use GitHub's built-in credential mechanisms for container registry access.

@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The CI/CD workflow's container registry authentication credentials were updated to use GitHub's built-in actor and token instead of external S9 registry secrets. Both secret source mappings were replaced while maintaining the same credential structure for downstream pipeline consumption.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/ui-cicd.yml
Updated reusable workflow secret mappings: registry-username now sources from ${{ secrets.github.actor }} instead of ${{ secrets.S9_REGISTRY_USERNAME }}, and registry-password now sources from ${{ secrets.GITHUB_TOKEN }} instead of ${{ secrets.S9_REGISTRY_TOKEN }}.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A workflow updated with care,
GitHub secrets now in the air,
Actor and token, a cleaner way,
Credentials refreshed, hip-hip-hooray! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating registry credentials and secret references in the CI/CD workflow file (.github/workflows/ui-cicd.yml).
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 cdicd-patches-1

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: 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/ui-cicd.yml:
- Around line 34-35: Replace the incorrect secrets reference and fix the Docker
Hub auth: change the registry-username value from the invalid
secrets.github.actor to the workflow context github.actor, and stop using
secrets.GITHUB_TOKEN for docker.io auth; instead wire in repository secrets for
Docker Hub (e.g., use secrets.DOCKERHUB_USERNAME and secrets.DOCKERHUB_PAT as
the registry-username and registry-password) or alternatively change the target
registry to ghcr.io and keep GITHUB_TOKEN for auth; update the keys referenced
in the workflow accordingly (registry-username, registry-password) and ensure
the corresponding secrets are created in the repo settings.
🪄 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: 0623871f-8c3d-4f7e-b6a5-28f2a230b7b7

📥 Commits

Reviewing files that changed from the base of the PR and between 5836b19 and 995de72.

📒 Files selected for processing (1)
  • .github/workflows/ui-cicd.yml

Comment on lines +34 to +35
registry-username: ${{ secrets.github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}

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 | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

`For GitHub Actions reusable workflows:

  1. Is ${{ secrets.github.actor }} valid, or should actor be ${{ github.actor }}?
  2. Can ${{ secrets.GITHUB_TOKEN }} authenticate docker/login-action against Docker Hub (docker.io)?`

💡 Result:

  1. ${{ secrets.github.actor }} is not valid. The actor should be accessed using ${{ github.actor }}. The secrets context provides access to repository, organization, or environment secrets (e.g., ${{ secrets.MY_SECRET }}), and GITHUB_TOKEN (e.g., ${{ secrets.GITHUB_TOKEN }}). The github context provides event and run information, including github.actor which is the username of the user or app that triggered the workflow. No sources mention or validate secrets.github.actor; it would resolve to a non-existent secret named github.actor. 2) No, ${{ secrets.GITHUB_TOKEN }} cannot authenticate docker/login-action against Docker Hub (docker.io). For Docker Hub, use a Docker Hub personal access token stored as a repository secret (e.g., ${{ secrets.DOCKERHUB_TOKEN }}) with username (e.g., ${{ vars.DOCKERHUB_USERNAME }} or secret). Official docker/login-action documentation and examples explicitly recommend and show Docker Hub PAT, not GITHUB_TOKEN. GITHUB_TOKEN works for GitHub Container Registry (ghcr.io) with registry: ghcr.io, username: ${{ github.actor }}, password: ${{ secrets.GITHUB_TOKEN }}, but defaults to docker.io and requires Docker Hub credentials.

Citations:


Fix invalid actor reference and incompatible Docker Hub auth token.

Line 34 uses an invalid expression (${{ secrets.github.actor }}—the actor should be ${{ github.actor }} from the github context, not secrets). Line 35 uses GITHUB_TOKEN for docker.io auth, which will fail; GITHUB_TOKEN works only with GitHub Container Registry (ghcr.io), not Docker Hub.

🔧 Suggested fix (keep Docker Hub)
-      registry-username: ${{ secrets.github.actor }}
-      registry-password: ${{ secrets.GITHUB_TOKEN }}
+      registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
+      registry-password: ${{ secrets.DOCKERHUB_TOKEN }}

Store Docker Hub username and PAT as repository secrets.

Alternatively, migrate the registry and image target to GHCR (ghcr.io) to use GITHUB_TOKEN.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
registry-username: ${{ secrets.github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
🧰 Tools
🪛 actionlint (1.7.11)

[error] 34-34: receiver of object dereference "actor" must be type of object but got "string"

(expression)

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

In @.github/workflows/ui-cicd.yml around lines 34 - 35, Replace the incorrect
secrets reference and fix the Docker Hub auth: change the registry-username
value from the invalid secrets.github.actor to the workflow context
github.actor, and stop using secrets.GITHUB_TOKEN for docker.io auth; instead
wire in repository secrets for Docker Hub (e.g., use secrets.DOCKERHUB_USERNAME
and secrets.DOCKERHUB_PAT as the registry-username and registry-password) or
alternatively change the target registry to ghcr.io and keep GITHUB_TOKEN for
auth; update the keys referenced in the workflow accordingly (registry-username,
registry-password) and ensure the corresponding secrets are created in the repo
settings.

@omarghatasheh
omarghatasheh merged commit 9a9db43 into main Mar 31, 2026
3 checks passed
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.

2 participants