chore(deps): update cargo (runtime) #90
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: 🔀OpenAPI - Axios Client | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ⬇️ | |
uses: actions/checkout@v4.2.2 | |
with: | |
ref: main | |
show-progress: false | |
- name: Cache Dependencies 📦 | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Copy Config File 📄 | |
run: cp config.yaml.example config.yaml | |
- name: Build 🛠️ | |
run: cargo build --verbose | |
- name: Generate OpenAPI Spec 📜 | |
run: cargo run -- merge --specs './docs/' --output './static/openapi.yaml' | |
- name: Commit changes 📤 | |
run: | | |
git config --global user.email "action@github.com" | |
git config --global user.name "GitHub Action" | |
git add . | |
git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update openapi schema 🔄" && git push) | |
- name: Dispatch event to Axios Client 🚀 | |
uses: convictional/trigger-workflow-and-wait@v1.6.5 | |
with: | |
owner: fis2425 | |
repo: apiclient | |
github_token: ${{ secrets.DISPATCH_TOKEN }} | |
workflow_file_name: generation.yml | |
ref: main | |
wait_workflow: false |