Skip to content

ci(docker): check out release tags explicitly and drop token persistence - #416

Merged
pashidlos merged 1 commit into
masterfrom
ci/docker-workflow-hardening
Oct 24, 2026
Merged

pashidlos merged 1 commit into
masterfrom
ci/docker-workflow-hardening

Conversation

@pashidlos

Copy link
Copy Markdown
Member

Follow-up to #412, addressing the two CodeRabbit findings on .github/workflows/docker.yml:

  • Tag vs branch (major): a manual run used ref: ${{ inputs.tag }}. If a branch has the same name as the tag, actions/checkout resolves it to the branch, so branch contents could be published under a release version. Manual runs now check out refs/tags/<tag> (a missing tag fails instead).
  • Token persistence (minor): actions/checkout writes GITHUB_TOKEN into .git/config, and the api image builds with context: . (no .dockerignore excludes .git). Set persist-credentials: false and permissions: contents: read; pushes authenticate with the Docker Hub secrets, not GITHUB_TOKEN.

The same change is applied to the ui workflow in Visual-Regression-Tracker/frontend#431.

🤖 Generated with Claude Code

- workflow_dispatch checks out refs/tags/<tag>, so a branch with the same
  name can't be published under a release version
- persist-credentials: false keeps GITHUB_TOKEN out of .git/config, which
  is part of the build context
- permissions: contents: read; pushes use the Docker Hub secrets

Addresses CodeRabbit review on backend#412.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 24c166b and 8d20b37.

Files selected for processing: 1
  • .github/workflows/docker.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@pashidlos
pashidlos merged commit 29acc39 into master Oct 24, 2026
5 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.

1 participant