Skip to content

WIP: Do not merge. Added Vale check action for CI testing(DO NOT MERGE) #5

WIP: Do not merge. Added Vale check action for CI testing(DO NOT MERGE)

WIP: Do not merge. Added Vale check action for CI testing(DO NOT MERGE) #5

Workflow file for this run

---
name: Lint with Vale on pull requests
on:
pull_request:
paths:
- "**.adoc"
- "**.md"
- content/learn/**
- content/patterns/**
- content/contribute/**
- modules/**
jobs:
vale-lint:
name: Linting with Vale
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 3
- name: Install dependencies
run: >
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-upgrade asciidoctor jq
- name: Install Vale
run: >
wget -O vale.tar.gz
https://github.com/errata-ai/vale/releases/download/v3.12.0/vale_3.12.0_Linux_64-bit.tar.gz
tar -xzf vale.tar.gz
sudo mv vale /usr/local/bin/
vale --version
- name: Run Vale linting script
env:
GITHUB_TOKEN: ${{ secrets.VALE_GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: >
# Always pass, even if the script fails
set +e
# Run the Vale linting script
./.github/workflows/scripts/lintwithvale.sh \
"${{ github.event.pull_request.base.sha }}" \
"${{ github.event.pull_request.head.sha }}" || {
echo "⚠️ Vale linting script encountered an error, but workflow will continue."
}
# Always exit successfully
exit 0
- name: Workflow summary
if: always()
run: >
echo "✅ Vale linting workflow completed"
echo "📋 This workflow is configured to always pass, regardless of linting results"
echo "🔍 Check the previous step logs for Vale linting details"
echo "💬 PR comment is added if Vale finds issues."