-
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (68 loc) · 2.69 KB
/
OpenAPI.yaml
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
66
67
68
69
70
71
72
73
74
# 🐻❄️📦 charted-server: Free, open source, and reliable Helm Chart registry made in Rust
# Copyright 2022-2023 Noelware, LLC. <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Generate OpenAPI document
on:
workflow_dispatch: {}
push:
branches:
- main
paths-ignore:
- '.github/**'
- '.coder/**'
- '.devcontainer/**'
- '.vscode/**'
- 'docs/**'
- 'scripts/**'
- '.*ignore'
- '**.md'
- renovate.json
- LICENSE
env:
BAZEL_STARTUP_ARGS: --bazelrc=./.bazelrc --host_jvm_args=-Xmx500m --host_jvm_args=-Xms500m
jobs:
openapi:
name: Generate
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Prettier
run: npm i -g prettier
- name: Setup Bazel cache
uses: actions/cache@v3
with:
path: |
${{runner.temp}}/_bazel_${{runner.os}}_${{runner.arch}}
~/.cache/bazelisk
restore-keys: bazel-cache-ubuntu-latest-
key: bazel-cache-ubuntu-latest-${{ hashFiles('WORKSPACE', 'BUILD.bazel', '.bazelversion') }}
- name: Generate document and format
run: |
bazel ${{env.BAZEL_STARTUP_ARGS}} run --disk_cache=${{runner.temp}}/_bazel_${{runner.os}}_${{runner.arch}} //:cli -- openapi ${GITHUB_WORKSPACE}/assets/openapi.json
prettier --write --config ${GITHUB_WORKSPACE}/web/.prettierrc.json ./assets/openapi.json
- name: Commit changes (if we can)
uses: EndBug/add-and-commit@v9
with:
author_name: Noel[bot]
default_author: user_info
author_email: [email protected]
message: '[skip ci] :sparkles: Update OpenAPI spec'
push: true