-
Notifications
You must be signed in to change notification settings - Fork 0
OCI Registry Helm Distribution and Security Enhancements #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix YAML syntax error on line 102 caused by multi-line string with
embedded GitHub Actions expressions.
Changed from inline string variable to heredoc file approach:
- Extract all GitHub expressions to shell variables first
- Use heredoc to write tag message to temp file
- Pass file to git tag with -F flag
This avoids YAML parsing issues with special characters and
multi-line strings containing ${{ }} expressions.
Fixes: Invalid workflow file syntax error
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a YAML syntax error in the create-release-tag workflow caused by multi-line strings containing GitHub Actions expressions. The fix refactors the tag message creation to use a heredoc approach with a temporary file.
Key Changes:
- Extract GitHub Actions expressions (
steps.commit.outputs.*,github.actor) to shell variables before building the tag message - Replace inline multi-line string with heredoc writing to
/tmp/tag_message.txt - Update
git tagcommand to read message from file using-Fflag instead of inline-mflag
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Create annotated tag | ||
| git tag -a "$TAG" -m "$TAG_MESSAGE" | ||
| git tag -a "$TAG" -F /tmp/tag_message.txt |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding cleanup for the temporary file after the tag is created. While GitHub Actions runners are ephemeral and this won't cause issues in practice, it's a good practice to clean up temporary resources:
# Create annotated tag
git tag -a "$TAG" -F /tmp/tag_message.txt
# Clean up temporary file
rm -f /tmp/tag_message.txt| git tag -a "$TAG" -F /tmp/tag_message.txt | |
| git tag -a "$TAG" -F /tmp/tag_message.txt | |
| # Clean up temporary file | |
| rm -f /tmp/tag_message.txt |
Pull Request Test Coverage Report for Build 19475368201Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Add cleanup step to remove temporary file after tag creation. While GitHub Actions runners are ephemeral, this follows best practices for resource cleanup. Addresses: Copilot review suggestion
Use quoted heredoc ('EOF' instead of EOF) to prevent variable
expansion issues in YAML/bash. Replace variables after heredoc
using sed to avoid special character and newline problems.
Changes:
- Use <<'EOF' to prevent immediate variable expansion
- Remove emoji that might cause encoding issues
- Use sed to replace variables in the temp file
- Simplifies YAML parsing and prevents syntax errors
Fixes: YAML syntax error on line 104
Summary
This PR modernizes the Helm chart distribution strategy and significantly enhances supply chain security by implementing OCI registry-based distribution and pinning all GitHub Actions to commit hashes.
Key Changes
1. 🎯 OCI Registry for Helm Charts (Primary Distribution)
oci://ghcr.io/splunk/charts/splunk-ai-operator.tgzfiles committed to git repository.tgzfiles maintained for backward compatibility (Helm < 3.8)Benefits:
2. 🐳 Docker Image Build in Release Workflow
release-package-helm.ymlv0.1.0,0.1.0,0.1,latestBefore: Release workflow only packaged Helm charts (images missing!)
After: Complete release automation (Docker + Helm + Manifests)
3. 🔒 Supply Chain Security - Pinned GitHub Actions
All GitHub Actions pinned to commit hashes to prevent supply chain attacks:
Workflows Updated:
main-unit-tests.yml- All actions pinnedmain-build-image.yml- All Docker actions pinnedprerelease-update-versions.yml- Third-party actions pinnedhelm-lint-test.yml- All actions pinnedrelease-package-helm.yml- All actions pinnedcodeql-analysis.yml- CodeQL actions pinnedThird-party actions secured (highest priority):
coverallsapp/github-action@v2→5cbfd81b...jacobtomlinson/gha-find-replace@v3→2ff30f64...peter-evans/create-pull-request@v3.10.1→7380612b...azure/setup-helm@v4→bf6a7d30...helm/chart-testing-action@v2.6.1→e6669bcd...helm/kind-action@v1.10.0→0025e74a...softprops/action-gh-release@v1→26994186...Security benefits:
4. 📚 Documentation Updates
All documentation updated to reflect OCI registry and version 0.1.0:
Files Updated:
README.md- OCI registry as primary methoddocs/installation.md- Complete rewrite with OCI as Method 1docs/deployment/helm-deployment.md- OCI registry examplesdocs/releases.md- Release process with version 0.1.0Version Correction: Changed all examples from
1.0.0to0.1.0(pre-GA release)5. 🔧 Workflow Fixes
developbranch triggerscreate-release-tag.ymlInstallation Examples
OCI Registry (Recommended - Helm 3.8+)
Release Artifacts
When v0.1.0 is released, the following will be published:
OCI Registry (GHCR):
Docker Images:
GitHub Release:
Testing
Breaking Changes
None - backward compatible. GitHub Release .tgz files still available for Helm < 3.8.
Migration Path
For users on Helm 3.8+: Migrate to OCI registry (recommended)
For users on Helm < 3.8: Continue using GitHub Release URLs
Checklist
Post-Merge Actions
After this PR is merged:
Related Issues
Fixes: CodeQL warning "Unpinned tag for a non-immutable Action"Fixes: PR merge blocked by "Code scanning is waiting for results"Fixes: Docker images not built during releases