Skip to content

docs: fix v4 migration doc formatting #5096

docs: fix v4 migration doc formatting

docs: fix v4 migration doc formatting #5096

Workflow file for this run

name: PRs checks
on:
pull_request:
branches:
- main
- "release-v[0-9]+"
- "release-v[0-9]+.[0-9]+"
jobs:
docs-changed:
runs-on: ubuntu-22.04
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if documentation related files changed
id: changed-files
uses: tj-actions/changed-files@v39
with:
files: |
**/*.md
images/*
ci/*
.github/*
**/Makefile
.*
chart-changed:
runs-on: ubuntu-22.04
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if Helm Chart related files changed
id: changed-files
uses: tj-actions/changed-files@v39
with:
files: |
deploy/helm/sumologic/**/*
**/*.yaml
**/*.yml
**/go.mod
**/go.sum
**/*.go
ci/*
.github/*
**/Makefile
.*
tests/integration/kind_images.json
markdownlint:
runs-on: ubuntu-22.04
needs: [docs-changed]
env:
PRETTIER_VERSION: 2.8.4
steps:
- uses: actions/checkout@v4
- name: install markdownlint and prettier
if: needs.docs-changed.outputs.any_changed == 'true'
run: npm install -g markdownlint-cli prettier@${PRETTIER_VERSION}
- name: markdown-lint check
if: needs.docs-changed.outputs.any_changed == 'true'
run: make markdown-lint
shellcheck:
runs-on: ubuntu-22.04
env:
YQ_VERSION: 4.33.2
SHELLCHECK_VERSION: 0.9.0
steps:
- uses: actions/checkout@v4
- name: install shellcheck
run: |
curl --retry 10 --retry-max-time 120 --retry-delay 5 -Lo- https://github.com/koalaman/shellcheck/releases/download/v${{ env.SHELLCHECK_VERSION }}/shellcheck-v${{ env.SHELLCHECK_VERSION }}.linux.x86_64.tar.xz | tar -xJf -
sudo cp shellcheck-v${{ env.SHELLCHECK_VERSION }}/shellcheck /usr/local/bin && rm -rf shellcheck-v${{ env.SHELLCHECK_VERSION }}
- name: install yq
run: |
curl --retry 10 --retry-max-time 120 --retry-delay 5 -L -o /tmp/yq https://github.com/mikefarah/yq/releases/download/v${{ env.YQ_VERSION }}/yq_linux_amd64
chmod +x /tmp/yq
sudo mv /tmp/yq /usr/local/bin/yq
- name: shellcheck
run: make shellcheck
yamllint:
runs-on: ubuntu-22.04
needs: [chart-changed]
env:
PRETTIER_VERSION: 2.8.4
steps:
- uses: actions/checkout@v4
- name: install yamllint
if: needs.chart-changed.outputs.any_changed == 'true'
run: npm install -g prettier@${PRETTIER_VERSION}
- name: yamllint
if: needs.chart-changed.outputs.any_changed == 'true'
run: make yaml-lint
helmlint:
runs-on: ubuntu-22.04
needs: [chart-changed]
steps:
- uses: actions/checkout@v4
- name: Lint helm chart
if: needs.chart-changed.outputs.any_changed == 'true'
run: |
make helm-dependency-update
make helm-lint
markdown-link-check:
runs-on: ubuntu-22.04
needs: [docs-changed]
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ".markdown_link_check.json"
use-quiet-mode: yes
check-modified-files-only: yes
base-branch: ${{ github.base_ref }}
md-links-lint:
runs-on: ubuntu-22.04
needs: [docs-changed]
steps:
- uses: actions/checkout@v4
- name: Lint markdown links
if: needs.docs-changed.outputs.any_changed == 'true'
run: |
make markdown-links-lint
check-configuration-keys:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install pyyaml
- run: |
make check-configuration-keys
lint-template-tests:
name: Lint template tests
runs-on: ubuntu-latest
needs: [chart-changed]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
if: needs.chart-changed.outputs.any_changed == 'true'
with:
go-version: "1.20"
cache: false
- name: golangci-lint
if: needs.chart-changed.outputs.any_changed == 'true'
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
working-directory: ./tests/helm/
# Optional: golangci-lint command line arguments.
args: --timeout=10m --verbose
test:
runs-on: ubuntu-22.04
needs:
- helmlint
- chart-changed
steps:
- uses: actions/checkout@v4
- name: Setup go
if: needs.chart-changed.outputs.any_changed == 'true'
uses: actions/setup-go@v4
with:
go-version: "1.20"
cache-dependency-path: "**/go.sum"
- name: test
if: needs.chart-changed.outputs.any_changed == 'true'
run: make test-templates
integration-tests:
name: Integration Tests
needs: [chart-changed]
if: needs.chart-changed.outputs.any_changed == 'true'
uses: ./.github/workflows/workflow-integration-tests.yaml