Skip to content

Follow Up

Follow Up #32

Workflow file for this run

name: Follow Up
on: workflow_dispatch
jobs:
follow-up:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: solvedac/unofficial-documentation
path: unofficial-documentation
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
- uses: actions/setup-node@v2
- name: Override OpenAPI Version to 3.0.x (generator does not support 3.1)
run: |
for file in `find unofficial-documentation/src -type f`; do
sed -i 's/openapi: "3.1.0"/openapi: "3.0.0"/' $file
done
- 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@v3
with:
commit-message: Follow-up solvedac/unofficial-documentation
title: Follow-up solvedac/unofficial-documentation
body: |
This Pull Request will update the typescript sources.
It is automatically created by GitHub Actions.
labels: follow-up