From a6bb4bc4c8d192b76f105343dc7de3c8979179e1 Mon Sep 17 00:00:00 2001 From: daddydaddy Date: Mon, 17 Aug 2026 11:20:44 +0900 Subject: [PATCH] Add README update workflow --- .github/workflows/update-readme.yml | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..7e51f67 --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,48 @@ +name: Update README + +on: + schedule: + # 毎週月曜 09:00 JST (00:00 UTC) + - cron: "0 0 * * 1" + + workflow_dispatch: + +jobs: + update-readme: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install dependencies + run: | + pip install requests python-dotenv + + - name: Run script + env: + QIITA_TOKEN: ${{ secrets.QIITA_TOKEN }} + run: | + python scripts/update_readme.py + + - name: Commit and push + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git add README.md + + if git diff --cached --quiet; then + echo "No changes" + else + git commit -m "Update README from Qiita" + git push + fi \ No newline at end of file