Skip to content

fix(lint): scope golangci-lint cache per worktree (#234) #359

fix(lint): scope golangci-lint cache per worktree (#234)

fix(lint): scope golangci-lint cache per worktree (#234) #359

name: Build Helm Chart
on:
push:
branches: [ main ]
tags: [ 'ci-*' ]
paths-ignore:
- '*.md'
- 'docs/**'
- 'LICENSE'
- 'NOTICE'
- 'PROJECT'
- 'SECURITY_CONTACTS'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '*.md'
- 'docs/**'
- 'LICENSE'
- 'NOTICE'
- 'PROJECT'
- 'SECURITY_CONTACTS'
permissions:
contents: read
jobs:
build-helm-chart:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: Generate helm chart
run: make helm TAG=$(make tag)
- name: Package helm chart
run: make helm-package TAG=$(make tag)
- name: Upload helm chart artifact
uses: actions/upload-artifact@v4
with:
name: byoh-helm-chart
path: byoh-chart-*.tgz
retention-days: 1
- name: Log in to helm registry
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/ci-') }}
env:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: make helm-login
- name: Push helm chart
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/ci-') }}
run: make helm-push TAG=$(make tag)