Skip to content

Commit 36552bd

Browse files
authored
Merge pull request #5047 from OAI/dev-sync-with-main
dev: sync with main
2 parents 6a655d6 + 9976706 commit 36552bd

17 files changed

+675
-592
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
version: 2
22
updates:
3-
- package-ecosystem: github-actions
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
8-
- package-ecosystem: npm
9-
directory: "/"
10-
schedule:
11-
interval: daily
12-
open-pull-requests-limit: 10
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: npm
9+
directory: "/"
10+
schedule:
11+
interval: daily
12+
open-pull-requests-limit: 10
13+
groups:
14+
vitest:
15+
patterns:
16+
- "*vitest*"

.github/pull_request_template.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ present on the main branch, only on the development branches).
88
* 3.1.x spec and schemas: v3.1-dev branch
99
* 3.2.x spec and schemas: v3.2-dev branch
1010
* 3.3.x spec and schemas: v3.3-dev branch
11-
* registry templates: gh-pages branch, registry/...
12-
* registry contents: gh-pages branch, registries/...
1311
* process documentation and build infrastructure: main
1412
1513
Note that we do not accept changes to published specifications.

.github/templates/agenda.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ Any other business (add comments below to suggest topics) | TDC | |
3232
[Approved spec PRs](https://github.com/OAI/OpenAPI-Specification/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved) | @OAI/tsc | |
3333
[Active Projects](https://github.com/OAI/OpenAPI-Specification/projects?query=is%3Aopen) | @OAI/openapi-maintainers | |
3434
[New issues needing attention](https://github.com/search?q=repo%3Aoai%2Fopenapi-specification+is%3Aissue+comments%3A0+no%3Alabel+is%3Aopen) | @OAI/triage | |
35+
Identify next week's meeting host (2 mins) | All | Comment on next week's agenda |
3536

3637
/cc [@OAI/tsc](https://github.com/orgs/OAI/teams/tsc) please suggest items for inclusion.

.github/workflows/check-restricted-files.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,32 @@ name: check-restricted-files
88
on:
99
pull_request:
1010
paths:
11-
- 'schemas/**/*.yaml'
12-
- 'versions/*.md'
11+
- "versions/*.md"
1312

1413
jobs:
1514
check-files:
1615
runs-on: ubuntu-latest
1716
steps:
17+
- uses: actions/checkout@v5 # checkout repo content
18+
with:
19+
fetch-depth: 0
20+
1821
- name: Check changed files
1922
shell: bash
2023
run: |
2124
if [[ "${{ github.event.pull_request.head.repo.full_name }}" == "OAI/OpenAPI-Specification" ]] && \
2225
[[ "${{ github.event.pull_request.base.repo.full_name }}" == "OAI/OpenAPI-Specification" ]]; then
23-
24-
if [[ "${{ github.event.pull_request.head.ref }}" == "main" ]] && \
26+
27+
if [[ "${{ github.event.pull_request.head.ref }}" == "dev-sync-with-main" ]] && \
2528
[[ "${{ github.event.pull_request.base.ref }}" == "dev" ]]; then
26-
echo Sync from main to dev
29+
echo Sync from main to dev via ${{ github.event.pull_request.head.ref }}
2730
exit 0
2831
fi
2932
30-
if [[ "${{ github.event.pull_request.head.ref }}" == "dev" ]] && \
31-
[[ "${{ github.event.pull_request.base.ref }}" =~ ^v[0-9]+\.[0-9]+-dev$ ]]; then
32-
echo Sync from dev to ${{ github.event.pull_request.base.ref }}
33+
if [[ "${{ github.event.pull_request.head.ref }}" =~ ^v[0-9]+\.[0-9]+-dev-sync-with-dev$ ]] && \
34+
[[ "${{ github.event.pull_request.base.ref }}" =~ ^v[0-9]+\.[0-9]+-dev$ ]] && \
35+
[[ ${{ github.event.pull_request.head.ref }} == ${{ github.event.pull_request.base.ref }}* ]]; then
36+
echo Sync from dev to ${{ github.event.pull_request.base.ref }} via ${{ github.event.pull_request.head.ref }}
3337
exit 0
3438
fi
3539
@@ -40,5 +44,8 @@ jobs:
4044
fi
4145
fi
4246
43-
echo This PR contains changes to files that should not be changed
47+
echo This PR contains changes to files that should not be changed:
48+
echo
49+
git diff --compact-summary origin/${{ github.event.pull_request.base.ref }} origin/${{ github.event.pull_request.head.ref }} -- versions/
50+
4451
exit 1

.github/workflows/respec.yaml

Lines changed: 47 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: respec
22

3-
# author: @MikeRalphson
3+
# author: @MikeRalphson, @ralfhandl
44
# issue: https://github.com/OAI/OpenAPI-Specification/issues/1564
55

66
#
7-
# This workflow updates the respec 'pretty' rendered versions of the spec
8-
# on the gh-pages branch when the corresponding markdown files change.
7+
# This workflow creates a pull request for publishing HTML spec versions to the spec.openapis.org site.
98
#
109

1110
# run this manually from main
@@ -19,41 +18,50 @@ jobs:
1918
runs-on: ubuntu-latest
2019

2120
steps:
22-
- uses: actions/checkout@v5 # checkout main branch
23-
with:
24-
fetch-depth: 0
25-
26-
- uses: actions/setup-node@v5 # setup Node.js
27-
with:
28-
node-version: '20.x'
29-
30-
- name: Install dependencies
31-
run: npm ci
32-
33-
- uses: actions/checkout@v5 # checkout gh-pages branch
34-
with:
35-
ref: gh-pages
36-
path: deploy
37-
38-
- name: run main script
39-
run: scripts/md2html/build.sh
40-
41-
- name: Create Pull Request
42-
uses: peter-evans/create-pull-request@v6
43-
with:
44-
token: ${{ secrets.GITHUB_TOKEN }}
45-
branch: update-respec-version
46-
base: gh-pages
47-
delete-branch: true
48-
path: deploy
49-
labels: Housekeeping
50-
reviewers: earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
51-
title: Update ReSpec-rendered specification versions
52-
commit-message: Update ReSpec-rendered specification versions
53-
signoff: true
54-
body: |
55-
This pull request is automatically triggered by GitHub action `respec`.
56-
57-
The `versions/*.md` files have changed, so the HTML files are automatically being regenerated.
21+
- name: Generate access token
22+
id: generate-token
23+
uses: actions/create-github-app-token@v1
24+
with:
25+
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
26+
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
27+
owner: OAI
28+
repositories: spec.openapis.org
5829

30+
- uses: actions/checkout@v5 # checkout main branch of this repo
31+
with:
32+
fetch-depth: 0
5933

34+
- uses: actions/setup-node@v6 # setup Node.js
35+
with:
36+
node-version: "22.x"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- uses: actions/checkout@v5 # checkout main branch of website repo
42+
with:
43+
token: ${{ steps.generate-token.outputs.token }}
44+
repository: OAI/spec.openapis.org
45+
ref: main
46+
path: deploy
47+
48+
- name: run main script
49+
run: scripts/md2html/build.sh
50+
51+
- name: Create Pull Request
52+
uses: peter-evans/create-pull-request@v7
53+
with:
54+
token: ${{ steps.generate-token.outputs.token }}
55+
branch: openapi-spec-versions
56+
base: main
57+
delete-branch: true
58+
path: deploy
59+
labels: OpenAPI,Specification
60+
reviewers: earth2marsh,lornajane,mikekistler,miqui,ralfhandl,whitlockjc,handrews,karenetheridge
61+
title: OpenAPI - update ReSpec-rendered specification versions
62+
commit-message: Update ReSpec-rendered specification versions
63+
signoff: true
64+
body: |
65+
This pull request is automatically generated by GitHub action `respec` in the OAI/OpenAPI-Specification repo.
66+
67+
The `versions/*.md` files of the OpenAPI Specification have changed and the corresponding HTML files are regenerated.

.github/workflows/schema-publish.yaml

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,66 @@ name: schema-publish
44
# issue: https://github.com/OAI/OpenAPI-Specification/issues/3715
55

66
#
7-
# This workflow creates a pull request for publishing schema iterations to the gh-pages branch
7+
# This workflow creates a pull request for publishing schema iterations to the spec.openapis.org site.
88
#
99

1010
# run this on push to vX.Y-dev branches or manually
1111
on:
1212
push:
1313
branches:
14-
- 'v[0-9].[0-9]-dev'
14+
- "v[0-9].[0-9]-dev"
1515
paths:
16-
- 'src/schemas/validation/*.yaml'
17-
- 'scripts/schema-publish.sh'
18-
- '.github/workflows/schema-publish.yaml'
16+
- "src/schemas/validation/*.yaml"
1917
workflow_dispatch: {}
2018

2119
jobs:
2220
publish:
23-
2421
runs-on: ubuntu-latest
2522

2623
steps:
27-
- uses: actions/checkout@v5 # checkout main branch
28-
with:
29-
fetch-depth: 0
30-
31-
- uses: actions/setup-node@v5 # setup Node.js
32-
with:
33-
node-version: '22.x'
34-
35-
- name: Install dependencies
36-
run: npm ci
37-
38-
- uses: actions/checkout@v5 # checkout gh-pages branch
39-
with:
40-
ref: gh-pages
41-
path: deploy
42-
43-
- name: run main script
44-
run: scripts/schema-publish.sh
45-
46-
- name: Create Pull Request
47-
uses: peter-evans/create-pull-request@v6
48-
with:
49-
token: ${{ secrets.GITHUB_TOKEN }}
50-
branch: ${{ github.ref_name }}-publish-schema-iteration
51-
base: gh-pages
52-
delete-branch: true
53-
path: deploy
54-
labels: Housekeeping,Schema
55-
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
56-
title: '${{ github.ref_name }}: publish OpenAPI schema iterations'
57-
commit-message: New OpenAPI schema iterations
58-
signoff: true
59-
body: |
60-
This pull request is automatically generated by GitHub action `schema-publish`.
61-
The `src/schemas/validation/*.yaml` files have changed and JSON files are automatically generated.
24+
- name: Generate access token
25+
id: generate-token
26+
uses: actions/create-github-app-token@v1
27+
with:
28+
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
29+
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
30+
owner: OAI
31+
repositories: spec.openapis.org
32+
33+
- uses: actions/checkout@v5 # checkout main branch of this repo
34+
with:
35+
fetch-depth: 0
36+
37+
- uses: actions/setup-node@v6 # setup Node.js
38+
with:
39+
node-version: "22.x"
40+
41+
- name: Install dependencies
42+
run: npm ci
43+
44+
- uses: actions/checkout@v5 # checkout main branch of website repo
45+
with:
46+
token: ${{ steps.generate-token.outputs.token }}
47+
repository: OAI/spec.openapis.org
48+
ref: main
49+
path: deploy
50+
51+
- name: run main script
52+
run: scripts/schema-publish.sh
53+
54+
- name: Create Pull Request
55+
uses: peter-evans/create-pull-request@v7
56+
with:
57+
token: ${{ steps.generate-token.outputs.token }}
58+
branch: openapi-${{ github.ref_name }}-schema-iterations
59+
base: main
60+
delete-branch: true
61+
path: deploy
62+
labels: OpenAPI,Schema
63+
reviewers: earth2marsh,lornajane,mikekistler,miqui,ralfhandl,whitlockjc,handrews,karenetheridge
64+
title: "OpenAPI - publish ${{ github.ref_name }} schema iterations"
65+
commit-message: "New OpenAPI schema iterations published from ${{ github.ref_name }}"
66+
signoff: true
67+
body: |
68+
This pull request is automatically generated by GitHub action `schema-publish` in the OAI/OpenAPI-Specification repo.
69+
The `src/schemas/validation/*.yaml` files have changed and JSON files are automatically generated.

.github/workflows/schema-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- uses: actions/setup-node@v5 # setup Node.js
26+
- uses: actions/setup-node@v6 # setup Node.js
2727
with:
2828
node-version: '20.x'
2929

.github/workflows/sync-dev-to-vX.Y-dev.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515

1616
jobs:
1717
sync-branches:
18+
if: github.repository == 'OAI/OpenAPI-Specification'
1819
runs-on: ubuntu-latest
1920
steps:
2021
- name: Generate access token
@@ -61,11 +62,11 @@ jobs:
6162
--title "$BASE: sync with $HEAD" \
6263
--body "Merge relevant changes from \`$HEAD\` into \`$BASE\`.")
6364
echo ""
64-
echo "PR to sync $DEV_BRANCH: $PR"
65+
echo "PR to sync $BASE with $HEAD: $PR"
6566
sleep 10 # allow status checks to be triggered
6667
6768
gh pr checks $PR --watch --required || continue
68-
# gh pr merge $PR --merge --admin
69+
gh pr merge $PR --merge --admin
6970
done
7071
env:
7172
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

.github/workflows/sync-main-to-dev.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515

1616
jobs:
1717
sync-branch:
18+
if: github.repository == 'OAI/OpenAPI-Specification'
1819
runs-on: ubuntu-latest
1920
steps:
2021
- name: Generate access token

.github/workflows/validate-markdown.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ name: validate-markdown
33
# Author: @MikeRalphson
44
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/2130
55

6-
#
76
# This workflow validates markdown files in the project root.
87
# It also validates the work-in-progress specification file src/oas.md with slightly different rules.
9-
#
108

11-
# run this on push to any branch and creation of pull-requests
12-
on: [push, pull_request]
9+
# run this on pull requests (which includes pushes to their head branch)
10+
on:
11+
- pull_request
1312

1413
jobs:
1514
lint:
@@ -18,7 +17,7 @@ jobs:
1817
steps:
1918
- uses: actions/checkout@v5 # checkout repo content
2019

21-
- uses: actions/setup-node@v5 # setup Node.js
20+
- uses: actions/setup-node@v6 # setup Node.js
2221
with:
2322
node-version: "20.x"
2423

@@ -33,4 +32,4 @@ jobs:
3332
with:
3433
reporter: github-check
3534
fail_level: any
36-
filter_mode: nofilter
35+
filter_mode: file

0 commit comments

Comments
 (0)