Skip to content

fix(ci): fix boolean comparison in publish-ghcr signing condition#26

Merged
aRustyDev merged 1 commit intomainfrom
fix/publish-ghcr-boolean-condition
Jan 6, 2026
Merged

fix(ci): fix boolean comparison in publish-ghcr signing condition#26
aRustyDev merged 1 commit intomainfrom
fix/publish-ghcr-boolean-condition

Conversation

@aRustyDev
Copy link
Copy Markdown
Owner

@aRustyDev aRustyDev commented Jan 6, 2026

Summary

Two fixes for the publish-ghcr workflow signing:

Fix 1: Boolean comparison

The workflow input sign has type: boolean, but the conditions used string comparison:

if: inputs.sign == 'true'  # Boolean compared to string = always false!

Fix: Changed to if: inputs.sign (use boolean directly)

Fix 2: Sign by digest instead of tag

Cosign warns when signing by tag (e.g., chart:0.2.1) because the tag could point to a different image between push and sign. This is a security concern.

Fix: Capture digest from helm push output and sign using chart@sha256:...

Also updated release-please.yaml with the same digest-based signing.

Test plan

  • Run workflow: gh workflow run publish-ghcr.yaml -f charts=all -f sign=true
  • Verify "Install Cosign" step runs
  • Verify signing uses digest format (no deprecation warning)
  • Confirm charts are signed in GHCR

🤖 Generated with Claude Code

### Fixed
- Changed `default: 'true'` to `default: true` (string to boolean)
- Changed `inputs.sign == 'true'` to `inputs.sign` (boolean comparison)

The `type: boolean` input returns a boolean, not a string, so comparing
to `'true'` (string) was always false, causing signing steps to skip.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying helm-charts with  Cloudflare Pages  Cloudflare Pages

Latest commit: 64214b5
Status: ✅  Deploy successful!
Preview URL: https://cfe480b9.helm-charts-76l.pages.dev
Branch Preview URL: https://fix-publish-ghcr-boolean-con.helm-charts-76l.pages.dev

View logs

@aRustyDev aRustyDev merged commit 8adf325 into main Jan 6, 2026
12 checks passed
@aRustyDev aRustyDev deleted the fix/publish-ghcr-boolean-condition branch January 6, 2026 08:40
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