-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.71 KB
/
update-api.yml
File metadata and controls
65 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Update API
on:
schedule:
- cron: "0 3 * * 1"
- cron: "0 3 * * 4"
- cron: "0 3 * * 6"
workflow_dispatch:
jobs:
update-api:
name: Update API
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Checkout lichess-org/api
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: lichess-org/api
ref: master
path: lichess-api
fetch-depth: 1
- name: Copy files
run: |
rm -rf specs/*
mkdir -p specs/schemas specs/tags
cp -r lichess-api/doc/specs/schemas/. specs/schemas/
cp -r lichess-api/doc/specs/tags/. specs/tags/
cp lichess-api/doc/specs/lichess-api.yaml specs/lichess-api.yaml
rm -rf lichess-api
- name: Setup Bun
uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
with:
bun-version-file: ".bun-version"
- name: Install dependencies
run: bun ci
- name: Generate files
run: bun run gen
- name: Create or update Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
commit-message: "ci: update api"
title: "ci: update api"
committer: CI <ci@rman.dev>
author: CI <ci@rman.dev>
body: Update API
branch: update-api
delete-branch: true
assignees: gameroman
reviewers: gameroman
labels: ci