Skip to content

Commit

Permalink
Update wikize-refs-ci.yml
Browse files Browse the repository at this point in the history
Manually tested in sep. repo
  • Loading branch information
markcmiller86 authored Dec 16, 2023
1 parent 96fa09d commit 7951528
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/wikize-refs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ name: Wikize Refs Check
on:
pull_request:
branches: [ main ]
paths:
- '**.md'
- '!docs/**'
paths:
- '**.md'
- '!docs/**'

jobs:
wikize-refs-source:
wikize-refs-check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -22,8 +24,14 @@ jobs:

- name: Run wikize-refs on each file
run: |
set -e
files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }})
set -x
exstat=0
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
for file in $files; do
wikize-refs.py -u "$file"
utils/wikize_refs.py -u "$file"
if [[ $? -ne 0 ]]; then
echo "$file needs wiki refs updated"
exstat=1
fi
done
exit $exstat

0 comments on commit 7951528

Please sign in to comment.