Skip to content

Upgrade pipelines counter logic #18

Upgrade pipelines counter logic

Upgrade pipelines counter logic #18

name: Validate and Fix Markdown
on:
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
validate-and-fix-markdown:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Markdown Linter
run: npm install -g markdownlint-cli
- name: Lint and Fix Markdown files
run: markdownlint '**/*.md' --fix --config .github/.markdownlint.json
- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Commit and rebase changes
env:
PR_BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
git add -A
git commit -m "Fix Markdown syntax issues" || echo "No changes to commit"
git pull --rebase origin "$PR_BRANCH" || echo "No rebase needed"
git push origin HEAD:"$PR_BRANCH"