Update to latest patch from Data Dragon #1018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update to latest patch from Data Dragon | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
env: | |
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} | |
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Download latest patch | |
id: download | |
run: pnpm run update | |
- name: Commit latest patch | |
if: ${{ steps.download.outputs.should-commit == 'true' }} | |
env: | |
PATCH: ${{ steps.download.outputs.patch }} | |
run: | | |
git config user.name ${{ env.GIT_USER_NAME }} | |
git config user.email ${{ env.GIT_USER_EMAIL }} | |
git add -A | |
git commit -m "Update to patch $PATCH" | |
git push |