Skip to content

Commit be5eb8e

Browse files
authored
Merge branch 'main' into ci-python-version
2 parents 85fc8bf + d6b1d73 commit be5eb8e

File tree

9 files changed

+41
-32
lines changed

9 files changed

+41
-32
lines changed

.github/_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ au1ba7o = "au1ba7o"
1010
[default.extend-words]
1111
Appy = "Appy"
1212
fo = "fo"
13+
Iy = "Iy"

.github/workflows/main.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- name: "📥 Source checkout"
2121
uses: actions/checkout@v4
2222
- name: "➕ Setup Node"
23-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v4
2424
with:
25-
node-version: '18'
25+
node-version: '20'
2626
- name: "🔎 Run validator"
2727
run: |
2828
npx @redocly/cli@latest lint data/api/*/*.yaml
@@ -34,7 +34,7 @@ jobs:
3434
- name: "📥 Source checkout"
3535
uses: actions/checkout@v4
3636
- name: "➕ Setup Python"
37-
uses: actions/setup-python@v4
37+
uses: actions/setup-python@v5
3838
with:
3939
python-version: '3.9'
4040
cache: 'pip'
@@ -51,9 +51,9 @@ jobs:
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: "📥 Source checkout"
54-
uses: actions/checkout@v2
54+
uses: actions/checkout@v4
5555
- name: "➕ Setup Python"
56-
uses: actions/setup-python@v4
56+
uses: actions/setup-python@v5
5757
with:
5858
python-version: '3.9'
5959
cache: 'pip'
@@ -70,9 +70,9 @@ jobs:
7070
runs-on: ubuntu-latest
7171
steps:
7272
- name: "📥 Source checkout"
73-
uses: actions/checkout@v2
73+
uses: actions/checkout@v4
7474
- name: "➕ Setup Python"
75-
uses: actions/setup-python@v4
75+
uses: actions/setup-python@v5
7676
with:
7777
python-version: '3.9'
7878
cache: 'pip'
@@ -114,7 +114,7 @@ jobs:
114114
- name: "📥 Source checkout"
115115
uses: actions/checkout@v4
116116
- name: "➕ Setup Python"
117-
uses: actions/setup-python@v4
117+
uses: actions/setup-python@v5
118118
with:
119119
python-version: '3.9'
120120
cache: 'pip'
@@ -152,7 +152,7 @@ jobs:
152152
-o spec/server-server-api/api.json
153153
tar -czf openapi.tar.gz spec
154154
- name: "📤 Artifact upload"
155-
uses: actions/upload-artifact@v3
155+
uses: actions/upload-artifact@v4
156156
with:
157157
name: openapi-artifact
158158
path: openapi.tar.gz
@@ -166,15 +166,15 @@ jobs:
166166
- name: "📥 Source checkout"
167167
uses: actions/checkout@v4
168168
- name: "➕ Setup Python"
169-
uses: actions/setup-python@v4
169+
uses: actions/setup-python@v5
170170
with:
171171
python-version: '3.9'
172172
- name: "➕ Install towncrier"
173173
run: "pip install 'towncrier'"
174174
- name: "Generate changelog"
175175
run: ./scripts/generate-changelog.sh vUNSTABLE
176176
- name: "📤 Artifact upload"
177-
uses: actions/upload-artifact@v3
177+
uses: actions/upload-artifact@v4
178178
with:
179179
name: changelog-artifact
180180
path: content/changelog/vUNSTABLE.md
@@ -187,11 +187,11 @@ jobs:
187187
if: ${{ always() }}
188188
steps:
189189
- name: "➕ Setup Node"
190-
uses: actions/setup-node@v3
190+
uses: actions/setup-node@v4
191191
with:
192-
node-version: '18'
192+
node-version: '20'
193193
- name: "➕ Setup Hugo"
194-
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d
194+
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
195195
with:
196196
hugo-version: '0.113.0'
197197
extended: true
@@ -203,7 +203,7 @@ jobs:
203203
npm run get-proposals
204204
- name: "📥 Download generated changelog"
205205
if: "needs.generate-changelog.result == 'success'"
206-
uses: actions/download-artifact@v3
206+
uses: actions/download-artifact@v4
207207
with:
208208
name: changelog-artifact
209209
path: content/changelog
@@ -214,7 +214,7 @@ jobs:
214214
# https://spec.matrix.org/latest/client-server-api/api.json
215215
# Works for /unstable/ and /v1.1/ as well.
216216
- name: "📥 Spec definition download"
217-
uses: actions/download-artifact@v3
217+
uses: actions/download-artifact@v4
218218
with:
219219
name: openapi-artifact
220220
- name: "📝 Unpack the OpenAPI definitions in the right location"
@@ -224,7 +224,7 @@ jobs:
224224
- name: "📦 Tarball creation"
225225
run: tar -czf spec.tar.gz spec
226226
- name: "📤 Artifact upload"
227-
uses: actions/upload-artifact@v3
227+
uses: actions/upload-artifact@v4
228228
with:
229229
name: spec-artifact
230230
path: spec.tar.gz
@@ -238,7 +238,7 @@ jobs:
238238
uses: actions/checkout@v4
239239

240240
- name: "📥 Fetch built spec"
241-
uses: actions/download-artifact@v3
241+
uses: actions/download-artifact@v4
242242
with:
243243
name: spec-artifact
244244

@@ -264,11 +264,11 @@ jobs:
264264
if: ${{ startsWith(github.ref, 'refs/tags/') }}
265265
steps:
266266
- name: "➕ Setup Node"
267-
uses: actions/setup-node@v3
267+
uses: actions/setup-node@v4
268268
with:
269-
node-version: '18'
269+
node-version: '20'
270270
- name: "➕ Setup Hugo"
271-
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d
271+
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
272272
with:
273273
# Cannot build the spec with Hugo 0.125.0 because of https://github.com/google/docsy/issues/1930
274274
hugo-version: '0.124.1'
@@ -286,7 +286,7 @@ jobs:
286286
hugo --config config.toml,historical.toml --baseURL "/${GITHUB_REF/refs\/tags\//}" -d "spec"
287287
288288
- name: "📥 Spec definition download"
289-
uses: actions/download-artifact@v3
289+
uses: actions/download-artifact@v4
290290
with:
291291
name: openapi-artifact
292292
- name: "📝 Unpack the OpenAPI definitions in the right location"
@@ -296,7 +296,7 @@ jobs:
296296
- name: "📦 Tarball creation"
297297
run: tar -czf spec-historical.tar.gz spec
298298
- name: "📤 Artifact upload"
299-
uses: actions/upload-artifact@v3
299+
uses: actions/upload-artifact@v4
300300
with:
301301
name: spec-historical-artifact
302302
path: spec-historical.tar.gz

.github/workflows/netlify.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
echo "::set-output name=prnumber::$pr_number"
3636
3737
- name: '📥 Download artifact'
38-
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
38+
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
3939
with:
4040
workflow: main.yaml
4141
run_id: ${{ github.event.workflow_run.id }}
@@ -46,8 +46,7 @@ jobs:
4646

4747
- name: "📤 Deploy to Netlify"
4848
id: netlify
49-
# v2.1.0
50-
uses: nwtgck/actions-netlify@7a92f00dde8c92a5a9e8385ec2919775f7647352
49+
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0.0
5150
with:
5251
publish-dir: spec
5352
deploy-message: "Deploy from GitHub Actions"

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: 🔧 Yarn cache
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
2222
cache: "yarn"
2323
cache-dependency-path: packages/npm/yarn.lock
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: 🚀 Publish to npm
3636
id: npm-publish
37-
uses: JS-DevTools/npm-publish@5a85faf05d2ade2d5b6682bfe5359915d5159c6c # v2.2.1
37+
uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
3838
with:
3939
token: ${{ secrets.NPM_TOKEN }}
4040
package: packages/npm

.github/workflows/spell-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Check spelling of proposals
17-
uses: crate-ci/typos@ff3f309513469397e1094520fb7a054e057589e1
17+
uses: crate-ci/typos@f2c1f08a7b3c1b96050cb786baaa2a94797bdb7d # v1.20.10
1818
with:
19-
config: ${{github.workspace}}/.github/_typos.toml
19+
config: ${{github.workspace}}/.github/_typos.toml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add anchors in `definition` shortcode.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update most CI actions.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update typos CI action.

layouts/shortcodes/definition.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
{{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }}
2727
{{ $definition = partial "json-schema/resolve-allof" $definition }}
2828

29-
<section class="rendered-data definition" id="definition-{{ anchorize $definition.title }}">
29+
{{ $anchor_base := printf "definition-%s" (anchorize $definition.title) }}
30+
31+
<section class="rendered-data definition" id="{{ $anchor_base }}">
3032

3133
<details {{ if not $compact }}open{{ end }}>
3234
<summary>
@@ -46,7 +48,11 @@ <h1>
4648
{{ $definition.description | markdownify }}
4749

4850

49-
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }}
51+
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict
52+
"schema" $definition
53+
"anchor_base" $anchor_base
54+
"name" (printf "\"%s\"" $path))
55+
}}
5056

5157
{{ range $additional_types }}
5258
{{ partial "openapi/render-object-table" . }}

0 commit comments

Comments
 (0)