Skip to content

fix: Using mtls-auth plugin #8291

fix: Using mtls-auth plugin

fix: Using mtls-auth plugin #8291

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 }}
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check if manual review has been performed
uses: actions/github-script@v6
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@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
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@v3
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
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
sha: ${{ github.sha }}
files: |
app/
docs/
files_ignore: |
app/_src/.repos/kuma/**
app/gateway/2.7.x/**
app/gateway/2.6.x/**
app/mesh/raw/CHANGELOG.md
json: true
quotepath: false
escape_json: false
- uses: errata-ai/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-review
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}