Skip to content

feat: scanning pr for review - github action #2

feat: scanning pr for review - github action

feat: scanning pr for review - github action #2

Workflow file for this run

name: Check Artwork
on:
pull_request:
paths:
- 'art/**'
jobs:
check-artwork:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Fetch main branch
run: git fetch origin main
- name: Get new directories
id: new_dirs
run: |
NEW_DIRS=$(git diff --name-only --diff-filter=A origin/main | grep '^art/' | xargs -I{} dirname {} | sort -u | tr '\n' ' ')
echo "new_dirs=$NEW_DIRS" >> $GITHUB_ENV
echo "New directories: $new_dirs"
- name: Run artwork checks
run: |
for dir in $NEW_DIRS; do
node .github/workflows/check_artwork.cjs "$dir"
done
env:
NEW_DIRS: ${{ env.new_dirs }}