forked from OAI/Overlay-Specification
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 2.48 KB
/
respec.yaml
File metadata and controls
76 lines (62 loc) · 2.48 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
66
67
68
69
70
71
72
73
74
75
76
name: respec
# author: @MikeRalphson, @ralfhandl
# issue: https://github.com/OAI/OpenAPI-Specification/issues/1564
#
# This workflow creates a pull request for publishing HTML spec versions to the spec.openapis.org site.
#
# run this manually or on push of new spec versions to main
on:
push:
paths:
- "versions/[0-9].[0-9].[0-9].md"
branches:
- main
tags:
- '[0-9].[0-9].[0-9]'
workflow_dispatch: {}
jobs:
respec:
if: github.repository == 'OAI/Overlay-Specification'
runs-on: ubuntu-22.04
steps:
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
owner: OAI
repositories: spec.openapis.org
- uses: actions/checkout@v6 # checkout main branch of this repo
with:
fetch-depth: 0
- uses: actions/setup-node@v6 # setup Node.js
with:
node-version: "22.x"
- name: Install dependencies
run: npm ci
- uses: actions/checkout@v6 # checkout main branch of website repo
with:
token: ${{ steps.generate-token.outputs.token }}
repository: OAI/spec.openapis.org
ref: main
path: deploy
- name: run main script
run: scripts/md2html/build.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.generate-token.outputs.token }}
branch: overlay-spec-versions
base: main
delete-branch: true
path: deploy
labels: Overlay,Specification
reviewers: earth2marsh,lornajane,mikekistler,miqui,baywet,ralfhandl
title: Overlay - update ReSpec-rendered specification versions
commit-message: Update ReSpec-rendered specification versions
signoff: true
body: |
This pull request is automatically generated by GitHub action `respec` in the OAI/Overlay-Specification repo.
The `versions/*.md` files of the OpenAPI Specification have changed and the corresponding HTML files are regenerated.
⚠️⚠️⚠️ If you are publishing a new version (any kind), make sure to create the tag on the source repository **BEFORE** you merge this pull request. This should result in an additional commit being pushed to this branch to update the latest.html page.