Skip to content

Fix helm chart releasing #24

Fix helm chart releasing

Fix helm chart releasing #24

Workflow file for this run

name: Default CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-and-test-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Download go modules
run: go mod download
- name: Generate code
run: bash scripts/update-codegen.sh
- name: Validate there are no changes
run: |
git status --porcelain
export code=$(git status --porcelain | wc -l)
exit $code
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
build-and-test-helm-chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
- name: Print chart-testing version information
run: ct version
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.8.0
with:
cluster_name: chart-testing
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: |
docker build -t ghcr.io/cdayz/k8s-image-pre-puller:local .
kind load --name chart-testing docker-image ghcr.io/cdayz/k8s-image-pre-puller:local
ct install --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set=image.tag=local --set=replicas=1"