feat: add formative port #138
Workflow file for this run
This file contains 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: File Checker | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
file-checker: | |
name: Required Files Included | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Files | |
run: | | |
MISSING_FILES=0 | |
echo "# Missing Files Found π’" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
required_files=( | |
"catppuccin.user.css" | |
"assets/mocha.webp" | |
"assets/macchiato.webp" | |
"assets/frappe.webp" | |
"assets/latte.webp" | |
"assets/catwalk.webp" | |
) | |
find_files() { | |
local path=$1 | |
for file in "${required_files[@]}"; do | |
if [ ! -f "$path/$file" ]; then | |
MISSING_FILES=1 | |
echo "- $path/$file" >> $GITHUB_STEP_SUMMARY | |
fi | |
done | |
} | |
for dir in styles/*; do | |
if [ -d "$dir" ]; then | |
find_files "$dir" | |
fi | |
done | |
if [ $MISSING_FILES -eq 0 ]; then | |
echo "# No Missing Files π" > $GITHUB_STEP_SUMMARY | |
fi | |
exit $MISSING_FILES | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json |