2023-05-05 03:24:31 +08:00
|
|
|
name: Update osu-web mod definitions
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-mod-definitions:
|
|
|
|
name: Update osu-web mod definitions
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-02 00:11:58 +08:00
|
|
|
- name: Install .NET 8.0.x
|
2024-02-22 23:58:21 +08:00
|
|
|
uses: actions/setup-dotnet@v4
|
2023-05-05 03:24:31 +08:00
|
|
|
with:
|
2024-02-02 00:11:58 +08:00
|
|
|
dotnet-version: "8.0.x"
|
2023-05-05 03:24:31 +08:00
|
|
|
|
|
|
|
- name: Checkout ppy/osu
|
2024-02-22 23:58:21 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-05-05 03:24:31 +08:00
|
|
|
with:
|
|
|
|
path: osu
|
|
|
|
|
|
|
|
- name: Checkout ppy/osu-tools
|
2024-02-22 23:58:21 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-05-05 03:24:31 +08:00
|
|
|
with:
|
|
|
|
repository: ppy/osu-tools
|
|
|
|
path: osu-tools
|
|
|
|
|
|
|
|
- name: Checkout ppy/osu-web
|
2024-02-22 23:58:21 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-05-05 03:24:31 +08:00
|
|
|
with:
|
|
|
|
repository: ppy/osu-web
|
|
|
|
path: osu-web
|
|
|
|
|
|
|
|
- name: Setup local game checkout for tools
|
|
|
|
run: ./UseLocalOsu.sh
|
|
|
|
working-directory: ./osu-tools
|
|
|
|
|
|
|
|
- name: Regenerate mod definitions
|
|
|
|
run: dotnet run --project PerformanceCalculator -- mods > ../osu-web/database/mods.json
|
|
|
|
working-directory: ./osu-tools
|
|
|
|
|
|
|
|
- name: Create pull request with changes
|
2024-02-22 23:58:21 +08:00
|
|
|
uses: peter-evans/create-pull-request@v6
|
2023-05-05 03:24:31 +08:00
|
|
|
with:
|
|
|
|
title: Update mod definitions
|
|
|
|
body: "This PR has been auto-generated to update the mod definitions to match ppy/osu@${{ github.ref_name }}."
|
|
|
|
branch: update-mod-definitions
|
|
|
|
commit-message: Update mod definitions
|
|
|
|
path: osu-web
|
|
|
|
token: ${{ secrets.OSU_WEB_PULL_REQUEST_PAT }}
|