Update rest-api-spec #7362
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: Update rest-api-spec | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */3 * * *' # At minute 0 past every 3rd hour. | |
jobs: | |
update-rest-api: | |
name: Update rest-api-spec | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: ['main', '8.8', '8.7', '7.17'] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- 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: | | |
SKIP_VERSION_UPDATE=true make contrib | |
- name: Debug git status | |
run: | | |
git status --porcelain | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
title: Update rest-api-spec ${{ matrix.branch }} | |
body: 'As titled.' | |
commit-message: 'Update rest-api-spec' | |
labels: specification | |
delete-branch: true | |
team-reviewers: elastic/clients-team | |
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). | |