vars added for ai foundry #16
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate and Fix Markdown | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: 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 changes | |
run: | | |
git fetch origin | |
git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }} | |
git add -A | |
git commit -m "Fix Markdown syntax issues" || echo "No changes to commit" | |
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed" | |
git push origin HEAD:${{ github.event.pull_request.head.ref }} |