forked from firecrawl/firecrawl
-
Notifications
You must be signed in to change notification settings - Fork 0
ci: publish helm chart to GHCR #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Lint Helm Chart | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - examples/kubernetes/firecrawl-helm/** | ||
| - .github/workflows/lint-helm-chart.yml | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint and Template | ||
| runs-on: blacksmith-2vcpu-ubuntu-2404 | ||
| defaults: | ||
| run: | ||
| working-directory: ./examples/kubernetes/firecrawl-helm | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Helm | ||
| uses: azure/setup-helm@v4 | ||
| with: | ||
| version: v3.15.4 | ||
|
|
||
| - name: Helm lint (base values) | ||
| run: helm lint . -f values.yaml | ||
|
|
||
| - name: Helm template (base values) | ||
| run: helm template firecrawl . -f values.yaml -n firecrawl > /dev/null | ||
|
|
||
| - name: Helm lint (prod overlay) | ||
| run: | | ||
| if [ -f overlays/prod/values.yaml ]; then | ||
| helm lint . -f values.yaml -f overlays/prod/values.yaml | ||
| fi | ||
|
|
||
| - name: Helm template (prod overlay) | ||
| run: | | ||
| if [ -f overlays/prod/values.yaml ]; then | ||
| helm template firecrawl . -f values.yaml -f overlays/prod/values.yaml -n firecrawl > /dev/null | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| name: Release Helm Chart | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - examples/kubernetes/firecrawl-helm/Chart.yaml | ||
| - examples/kubernetes/firecrawl-helm/** | ||
| - .github/workflows/release-helm-chart.yml | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Override chart version (optional). Leave empty to use Chart.yaml." | ||
| required: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Package and Push Chart to GHCR | ||
| runs-on: blacksmith-2vcpu-ubuntu-2404 | ||
| defaults: | ||
| run: | ||
| working-directory: ./examples/kubernetes/firecrawl-helm | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Helm | ||
| uses: azure/setup-helm@v4 | ||
| with: | ||
| version: v3.15.4 | ||
|
|
||
| - name: Lowercase Repo Owner | ||
| run: echo "REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_ENV" | ||
| env: | ||
| GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | ||
|
|
||
| - name: Resolve chart version | ||
| id: chart | ||
| run: | | ||
| if [ -n "${{ inputs.version }}" ]; then | ||
| VERSION="${{ inputs.version }}" | ||
| else | ||
| VERSION=$(awk '/^version:/ {print $2}' Chart.yaml) | ||
| fi | ||
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | ||
| echo "Chart version: ${VERSION}" | ||
|
|
||
| - name: Check if chart version already published | ||
| id: check | ||
| run: | | ||
| if helm show chart oci://ghcr.io/${REPO_OWNER}/charts/firecrawl \ | ||
| --version "${{ steps.chart.outputs.version }}" >/dev/null 2>&1; then | ||
| echo "exists=true" >> "$GITHUB_OUTPUT" | ||
| echo "Chart version ${{ steps.chart.outputs.version }} already published; skipping." | ||
| else | ||
| echo "exists=false" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Lint chart | ||
| if: steps.check.outputs.exists != 'true' | ||
| run: helm lint . | ||
|
|
||
| - name: Package chart | ||
| if: steps.check.outputs.exists != 'true' | ||
| run: helm package . --destination /tmp/helm-packages | ||
|
|
||
| - name: Login to GHCR | ||
| if: steps.check.outputs.exists != 'true' | ||
| run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u "${{ github.actor }}" --password-stdin | ||
|
|
||
| - name: Push chart to GHCR | ||
| if: steps.check.outputs.exists != 'true' | ||
| run: | | ||
| helm push /tmp/helm-packages/firecrawl-${{ steps.chart.outputs.version }}.tgz \ | ||
| oci://ghcr.io/${REPO_OWNER}/charts | ||
|
|
||
| - name: Summary | ||
| if: steps.check.outputs.exists != 'true' | ||
| run: | | ||
| { | ||
| echo "### Helm chart published" | ||
| echo "" | ||
| echo "Pulled with:" | ||
| echo "" | ||
| echo '```bash' | ||
| echo "helm pull oci://ghcr.io/${REPO_OWNER}/charts/firecrawl --version ${{ steps.chart.outputs.version }}" | ||
| echo '```' | ||
| echo "" | ||
| echo "Installed with:" | ||
| echo "" | ||
| echo '```bash' | ||
| echo "helm upgrade --install firecrawl oci://ghcr.io/${REPO_OWNER}/charts/firecrawl \\" | ||
| echo " --version ${{ steps.chart.outputs.version }} \\" | ||
| echo " -n firecrawl --create-namespace" | ||
| echo '```' | ||
| } >> "$GITHUB_STEP_SUMMARY" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The installation command is missing the
-f values.yamland-f overlays/prod/values.yamlflags that were present in the previous version. Since the chart's defaultvalues.yamlcontains several empty placeholders for critical configuration (e.g., API keys, database URLs), the installation will likely fail or be non-functional without providing these configuration files.