-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b308a2c
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Update EnkaDB Assets | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: '0 12 * * *' | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Fetch latest commit SHA | ||
id: latest_sha | ||
run: echo "::set-output name=sha::$(git ls-remote https://github.com/EnkaNetwork/API-docs.git HEAD | cut -f1)" | ||
|
||
- name: Install QuickType | ||
id: install_quicktype | ||
run: npm install -g quicktype | ||
|
||
- name: Run update asset meta script | ||
id: compare_shas | ||
run: make | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: update-enka-asset-${{ github.run_number }} | ||
base: main | ||
title: "Update EnkaDB Assets" | ||
body: | | ||
This PR updates the EnkaDB Asset JSON files. | ||
delete-branch: true | ||
assignees: CanglongCl | ||
reviewers: CanglongCl | ||
team-reviewers: | | ||
owners | ||
maintainers |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SHELL := /bin/sh | ||
.PHONY: build | ||
|
||
build: | ||
rm -rf /var/tmp/temporaryJSON4Enka/ || true | ||
mkdir /var/tmp/temporaryJSON4Enka/ | ||
git clone https://github.com/EnkaNetwork/API-docs.git /var/tmp/temporaryJSON4Enka/ | ||
cp -r /var/tmp/temporaryJSON4Enka/store ./ | ||
rm -rf /var/tmp/temporaryJSON4Enka/ | ||
export PATH=${PATH}:$(pwd) && CWD=$(pwd) && find . -name '*.json' -exec quicktype --lang swift {} --out {}.swift \; | ||
find . -name '*.json' -exec rm {} \; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# EnkaDBStructMonitor | ||
|
||
This repo is for tracking Swift Struct changes from Enka-API-Docs repository. |