Skip to content

Update master.yml

Update master.yml #5

Workflow file for this run

name: bundle-openapi
on:
push:
branches:
- main
jobs:
bundle:
name: Bundle OpenAPI and commit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
persist-credentials: false # We'll use a token instead
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Redocly CLI
run: npm install -g @redocly/cli@latest
- name: Bundle OpenAPI spec
run: npx @redocly/cli bundle openapi.json --output openapi-full.json
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update bundled OpenAPI spec"
file_pattern: openapi-full.json
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}