mirror of
https://github.com/daydreamer-json/ak-endfield-api-archive.git
synced 2026-02-04 06:15:04 +01:00
Hello
This commit is contained in:
38
.github/workflows/main.yml
vendored
Normal file
38
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Auto API update check
|
||||
permissions:
|
||||
actions: write
|
||||
checks: write
|
||||
contents: write
|
||||
on:
|
||||
# Scheduled trigger is disabled by default
|
||||
# Uncommenting the following two lines will enable it
|
||||
# schedule:
|
||||
# - cron: '0 16 * * *'
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
- name: Run script
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
max_attempts: 5
|
||||
timeout_minutes: 10
|
||||
command: bun run src/main.ts test
|
||||
- name: Format output data
|
||||
run: bun x oxfmt output
|
||||
- name: Git staging, commit, push
|
||||
continue-on-error: true
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add output
|
||||
git commit -m '[Auto] API update'
|
||||
git push
|
||||
Reference in New Issue
Block a user