feat(ci): publish helm chart #2
Workflow file for this run
This file contains 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
--- | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: "Charts: Publish to GHCR OCI" | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
branches: ["coreweave"] | |
types: ["opened", "synchronize", "reopened"] | |
paths: | |
- .github/workflows/publish-chart.yaml | |
- "**/*" | |
jobs: | |
publish-charts: | |
name: Publish chart | |
permissions: | |
contents: write | |
packages: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set VERSION from VERSION.txt | |
id: set_version | |
run: echo "VERSION=$(cat VERSION.txt)" >> $GITHUB_ENV | |
- name: Set HELM_VERSION | |
run: echo "HELM_VERSION=${{ env.VERSION }}-${{ github.sha }}" >> $GITHUB_ENV | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
- name: Package & Push Helm Charts | |
shell: bash | |
run: | | |
helm package cmd/k8s-operator/deploy/chart --dependency-update --version ${{ env.HELM_VERSION }} --app-version ${{ env.HELM_VERSION }} | |
pkg=$(ls tailscale-derp-*.tgz) | |
helm push "${pkg}" oci://ghcr.io/${{ github.repository }}/chart |