Follow Up #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |