Skip to content

Update docs for KIC 3.3.0 #12920

Update docs for KIC 3.3.0

Update docs for KIC 3.3.0 #12920

Workflow file for this run

name: Linting
on:
pull_request:
types: [synchronize, ready_for_review, opened]
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
env:
BUNDLE_GITHUB__COM: x-access-token:${{ secrets.BUNDLE_GITHUB__COM }}
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check if manual review has been performed
uses: actions/github-script@v7
id: labels
with:
result-encoding: string
script: |
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
...context.repo,
issue_number: context.issue.number
});
return labels.map(l => l.name).includes('ci:manual-approve:linting')
outputs:
result: ${{ steps.labels.outputs.result }}
prettier:
needs: check
if: needs.check.outputs.result == 'false'
name: Prettier
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
sha: ${{ github.sha }}
files: |
app/_src/**
app/_assets/**
files_ignore: |
app/_src/.repos/kuma/**
- run: npx prettier --check ${{ steps.changed-files.outputs.all_changed_files }}
rubocop:
needs: check
if: needs.check.outputs.result == 'false'
name: Rubocop
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
# Configure Ruby to build Jekyll site
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
- name: Ruby gem cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle Setup
run: bundle config path ${{ github.workspace }}/vendor/bundle
- name: Bundle Install
run: bundle install --jobs 4 --retry 3
- name: Rubocop
run: |
bundle exec rubocop app
vale:
needs: check
if: needs.check.outputs.result == 'false'
name: Vale
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
sha: ${{ github.sha }}
files: |
app/**
files_ignore: |
app/_src/.repos/kuma/**
app/gateway/2.7.x/**
app/gateway/2.6.x/**
app/assets/mesh/raw/CHANGELOG.md
app/assets/mesh/raw/UPGRADE.md
json: true
quotepath: false
escape_json: false
- uses: mheap/vale-action@reviewdog
if: steps.changed-files.outputs.any_changed == 'true'
with:
fail_on_error: true
files: '${{ steps.changed-files.outputs.all_changed_files }}'
filter_mode: file
reporter: github-pr-annotations
reviewdog_url: https://github.com/mheap/reviewdog/releases/download/v10.0.0/reviewdog_10.0.0_Linux_x86_64.tar.gz
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}