Skip to content

Update rest-api-spec #9575

Update rest-api-spec

Update rest-api-spec #9575

name: Update rest-api-spec
on:
workflow_dispatch:
schedule:
- cron: '0 4 * * *' # At 04:00.
jobs:
update-rest-api:
name: Update rest-api-spec
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: ['main', '8.x', '8.15', '7.17']
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
run: |
npm install --prefix .github/download-artifacts
npm install --prefix compiler
npm install --prefix typescript-generator
- name: Download artifacts
run: |
node .github/download-artifacts/index.js --branch ${{ matrix.branch }}
- name: Generate output
run: |
make contrib
- name: Debug git status
run: |
git status --porcelain
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: Update rest-api-spec ${{ matrix.branch }}
body: 'As titled.'
commit-message: 'Update rest-api-spec'
labels: specification
delete-branch: true
reviewers: Anaethelion,ezimuel,flobernd,JoshMock,l-trotta,miguelgrinberg,picandocodigo,pquentin,srikanthmanvi,swallez,technige
branch: automated/rest-api-spec-update-${{ matrix.branch }}
- name: Open an issue if the action fails
if: ${{ failure() }}
uses: nashmaniac/[email protected]
with:
title: rest-api-spec update failed
token: ${{ secrets.GITHUB_TOKEN }}
labels: bug
body: The rest-api-spec action is currently failing, see [here](https://github.com/elastic/elasticsearch-specification/actions/workflows/update-rest-api-json.yml).