Fetch Roblox API #7599
This file contains hidden or 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: Fetch Roblox API | |
| on: | |
| schedule: | |
| - cron: '0 * * * *' | |
| workflow_dispatch: | |
| jobs: | |
| fetch-api: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Get Roblox Version | |
| id: get_version | |
| run: | | |
| RAW=$(curl -s https://clientsettings.roblox.com/v2/client-version/WindowsStudio64/channel/LIVE) | |
| VERSION=$(echo "$RAW" | grep -oP 'version-[a-zA-Z0-9]+') | |
| echo "$VERSION" > deps_version.dat | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Fetch API | |
| run: | | |
| curl -s "http://setup.roblox.com/${VERSION}-API-Dump.json" -o rbx_api.dat | |
| - name: Commit | |
| run: | | |
| git config --global user.name 'github-actions' | |
| git config --global user.email 'github-actions@github.com' | |
| git add rbx_api.dat deps_version.dat | |
| if git status --porcelain | grep -q .; then | |
| git commit -m "update Roblox API" | |
| git push | |
| else | |
| echo "no update" | |
| fi |