bump: Update Conduktor Console to latest 1.30.0 #274
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: Chart testing | |
on: | |
pull_request: | |
paths: ["charts/**"] | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
branches: | |
- main | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
check-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install readme-generator-for-helm | |
run: npm install -g @bitnami/[email protected] | |
- uses: actions/checkout@v3 | |
name: Checkout Conduktor Charts | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Execute readme-generator-for-helm | |
env: | |
GH_TOKEN: ${{ github.token }} | |
TEMP_FILE: "${{runner.temp}}/pr-${{github.event.number}}.diff" | |
run: | | |
export PR_ID=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
gh pr diff ${PR_ID} > $TEMP_FILE | |
files_changed="$(sed -nr 's/[\-\+]{3} [ab]\/(.*)/\1/p' $TEMP_FILE | sort | uniq)" | |
# Adding || true to avoid "Process exited with code 1" errors | |
charts_dirs_changed="$(echo "$files_changed" | xargs dirname | grep -o "charts/[^/]*" | sort | uniq || true)" | |
for chart in ${charts_dirs_changed}; do | |
echo "Updating README.md for ${chart}" | |
readme-generator --values "${chart}/values.yaml" --readme "${chart}/README.md" | |
done | |
- name: Check diff | |
run: | | |
if git status -s | grep -E 'charts/.*/README.md'; then | |
git diff | |
echo "::error title=README::README need to be re-generated ! Use bitnami/readme-generator-for-helm to re-generate it." | |
exit 1 | |
fi | |
chart-linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout Conduktor Charts | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (lint) | |
run: ct lint --config .github/ct-lint-config.yaml | |
chart-testing: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Install helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: "v3.14.0" | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
with: | |
version: 3.11.0 | |
- name: Install K3D | |
shell: bash | |
env: | |
K3D_INSTALL_DIR: ${{ github.workspace }}/.github/.bin | |
K3D_VERSION: "5.7.3" | |
run: | | |
mkdir .github/.bin | |
export PATH="${{ github.workspace }}/.github/.bin:$PATH" | |
echo "PATH=${{ github.workspace }}/.github/.bin:$PATH" >> $GITHUB_ENV | |
echo "Installing k3d" | |
curl -s https://raw.githubusercontent.com/k3d-io/k3d/v${K3D_VERSION}/install.sh | USE_SUDO="false" bash | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config .github/ct-config.yaml --target-branch main) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Install helm dependencies | |
if: steps.list-changed.outputs.changed == 'true' | |
run: make helm-deps | |
- name: Create k3d cluster | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
make k3d-ci-up | |
kubectl create ns ct || true | |
- name: Run chart-testing (install) | |
run: ct install --config .github/ct-config.yaml | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Delete k3d cluster | |
if: always() | |
run: make k3d-down |