-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (43 loc) · 1.52 KB
/
follow-up.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
name: Follow Up
on:
workflow_dispatch:
inputs:
run-id:
description: docs page GHA run id
required: true
type: number
jobs:
follow-up:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: github-pages
repository: solvedac/unofficial-documentation
github-token: ${{ secrets.PAT_FOLLOW_UP }}
run-id: ${{ github.event.inputs.run-id }}
- run: ls -R
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: actions/setup-node@v4
- name: Generate
run: npx @openapitools/openapi-generator-cli batch --clean rust.yaml
- name: Update Version
run: |
sed -ri ":a;N;\$!ba;s/\"solvedac_api\"\nversion = \"[^\"]+\"/\"solvedac_api\"\nversion = \"`sed -rn 's/^.* version: "([^"]+)".*$/\1/p' unofficial-documentation/src/openapi.yaml | sed -rn 's/\.0+([0-9]+)/.\1/p'`\"/" Cargo.toml
- name: Move Generated Files
run: |
rm -rf src;
mv generated/src -t .;
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Follow-up solvedac/unofficial-documentation
title: Follow-up solvedac/unofficial-documentation
body: |
This Pull Request will update the sources based on upstream docs.
It is automatically created by GitHub Actions.
labels: follow-up