Skip to content

[260405] 공부 인증 #149

[260405] 공부 인증

[260405] 공부 인증 #149

Workflow file for this run

name: Build Study Reports
on:
workflow_dispatch:
issues:
types: [opened]
issue_comment:
types: [created]
schedule:
- cron: "5 15 * * *" # KST 00:05
concurrency:
group: study-report
cancel-in-progress: true
jobs:
auto-assign:
if: github.event_name == 'issues' && github.event.action == 'opened'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Auto-assign issue author
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
assignees: [context.payload.issue.user.login]
});
build:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install dependencies
run: pip install requests
- name: Build reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: python scripts/build_reports.py
- name: Commit reports
run: |
git config user.name "study-bot"
git config user.email "study-bot@users.noreply.github.com"
git add reports
if git diff --cached --quiet; then
echo "No changes"
else
git commit -m "update study reports"
git push
fi