Upload Helm Chart #13
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
name: Upload Helm Chart | |
on: | |
release: | |
types: | |
- published | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build chart | |
run: | | |
VERSION=$(echo "${{github.event.release.tag_name }}" | sed 's/v//g') | |
sed -i "s/^version:.*$/version: ${VERSION}/" ./chart//Chart.yaml | |
sed -i "s/^appVersion:.*$/appVersion: v${VERSION}/" ./chart//Chart.yaml | |
make docs | |
helm package ./chart/ --version $VERSION --app-version v$VERSION -d dist | |
helm push dist/java-truststore-injection-webhook-${VERSION}.tgz oci://ghcr.io/bakito/helm-charts | |
- name: Install chart-releaser | |
uses: engineerd/configurator@v0.0.10 | |
with: | |
name: cr | |
url: https://github.com/helm/chart-releaser/releases/download/v1.6.1/chart-releaser_1.6.1_darwin_amd64.tar.gz | |
pathInArchive: cr | |
- name: Upload Chart | |
run: cr upload | |
env: | |
CR_OWNER: "${{github.repository_owner}}" | |
CR_TOKEN: "${{secrets.CR_TOKEN}}" | |
CR_GIT_REPO: "helm-charts" | |
CR_PACKAGE_PATH: dist |