Skip to content

Weekly Commit Report #35

Weekly Commit Report

Weekly Commit Report #35

Workflow file for this run

name: 'Weekly Commit Report'
on:
push:
paths:
- '.github/workflows/weekly.yaml'
schedule:
- cron: '30 10 * * 5' # This sets the workflow to run at 10:00 UTC+0 every Friday (6 PM Beijing time)
workflow_dispatch: # This allows you to manually trigger the workflow
permissions:
contents: write
pull-requests: write
jobs:
generate-report:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
submodules: recursive
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r scripts/requirements.txt
- name: Generate weekly report
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
ORG_NAME: HITSZ-OpenAuto
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} # Add your OpenAI API key as a secret
NEWS_TYPE: weekly
run: |
python scripts/gen_news.py
# - name: Commit and push changes
# uses: EndBug/add-and-commit@v9
# with:
# add: 'content'
# default_author: github_actions
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'docs: new weekly report'
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
branch: weekly-report
title: 'Weekly Report'
body: 'This is the weekly report for the current week, automatically generated by GitHub Actions.'