Skip to content

Follow Up

Follow Up #58

Workflow file for this run

name: Follow Up
on:
workflow_dispatch:
inputs:
run-id:
description: docs page GHA run id
required: true
type: string
jobs:
follow-up:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: github-pages
path: unofficial-documentation
repository: solvedac/unofficial-documentation
github-token: ${{ secrets.PAT_FOLLOW_UP }}
run-id: ${{ github.event.inputs.run-id }}
- run: tar -xf artifact.tar ./tsp-output/@typespec/openapi3/openapi.yaml
working-directory: unofficial-documentation
- 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: |
file=unofficial-documentation/tsp-output/@typespec/openapi3/openapi.yaml
version=$(sed -rn 's/\s+version:\s*([^\n]+)/\1/p' $file | sed -rn 's/\.0+([0-9]+)/.\1/p')
sed -ri ":a;N;\$!ba;s/\"solvedac_api\"\nversion = \"[^\"]+\"/\"solvedac_api\"\nversion = \"$version\"/" 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