Skip to content

docs: Add daily report 2024/08/15 #21

docs: Add daily report 2024/08/15

docs: Add daily report 2024/08/15 #21

Workflow file for this run

name: Check Daily Reports
on:
pull_request:
paths:
- 'reports/**/*.md'
jobs:
validate-reports:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Validate report format
run: |
for file in $(git diff --name-only ${{ github.base_ref }} ${{ github.head_ref }}); do
if [[ $file == reports/**/*.md ]]; then
echo "Checking $file"
if ! grep -q "^### 今週の目標勉強時間" "$file"; then
echo "Error: Missing '### 今週の目標勉強時間' in $file"
exit 1
fi
if ! grep -q "^### 今日の勉強時間とデイリーハイライト" "$file"; then
echo "Error: Missing '### 今日の勉強時間' in $file"
exit 1
fi
if ! grep -q "^## 学習内容" "$file"; then
echo "Error: Missing '## 学習内容' in $file"
exit 1
fi
if ! grep -q "^### 学習メモ" "$file"; then
echo "Error: Missing '## 学習メモ' in $file"
exit 1
fi
if ! grep -q "^## 参考記事・URL" "$file"; then
echo "Error: Missing '## 参考記事・URL' in $file"
exit 1
fi
fi
done