Skip to content

Update WR

Update WR #232

Workflow file for this run

name: Update WR
on:
schedule:
# 15時に実行
- cron: "0 6 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-wr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
# GITHUB_TOKENを使ってPull Requestを作成するとtest-track.jsのworkflowが動かないので、GitHub Appのトークンを使うように。
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork
- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.WR_UPDATE_GITHUB_APP_ID }}
private_key: ${{ secrets.WR_UPDATE_GITHUB_APP_PRIVATE_KEY }}
- uses: eifinger/setup-rye@v4
id: setup-rye
with:
enable-cache: true
working-directory: wr-python
- name: Install dependencies
if: steps.setup-rye.outputs.cache-hit != 'true'
working-directory: wr-python
run: |
rye sync --no-lock
- name: Create track.js
working-directory: wr-python
run: rye run python ./src/wr_python/make_track_js.py
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
add-paths: "src/const/track.js"
commit-message: "feat(track.js): update WR"
delete-branch: true
title: Update WR