Skip to content

Add LangKit Helm Chart #2

Add LangKit Helm Chart

Add LangKit Helm Chart #2

Workflow file for this run

name: Publish Helm Chart
on:
push:
branches:
- main
pull_request:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Helm
uses: azure/setup-helm@v3
- name: Package Helm Chart
working-directory: ${{ github.workspace }}
run: |
helm package charts/langkit
- name: Login to GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login ghcr.io \
-u ${{ github.repository_owner }} \
--password-stdin
- name: Publish Helm Chart to GHCR
id: chart
run: |
chart=$(find . -name '*.tgz' | sort -r | head -n 1)
version=$(basename $chart | sed 's/\.tgz//')
ghcr_chart="ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/$version"
echo "::set-output name=chart::$chart"
echo "::set-output name=ghcr_chart::$ghcr_chart"
- name: Publish Chart to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
docker pull "${{ steps.chart.outputs.chart }}"
docker tag "${{ steps.chart.outputs.chart }}" "${{ steps.chart.outputs.ghcr_chart }}"
docker push "${{ steps.chart.outputs.ghcr_chart }}"