Merge pull request #318 from baywet/tests/additional-coverage-2 #51
This file contains hidden or 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: schema-publish | |
| # author: @ralfhandl | |
| # | |
| # This workflow creates a pull request for publishing schema iterations to the spec.openapis.org site. | |
| # | |
| # run this on changes to published schemas or manually | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "schemas/v[0-9].[0-9]/*.yaml" | |
| workflow_dispatch: {} | |
| jobs: | |
| publish: | |
| if: github.repository == 'OAI/Overlay-Specification' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate access token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} | |
| private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} | |
| owner: OAI | |
| repositories: spec.openapis.org | |
| - uses: actions/checkout@v6 # checkout main branch of this repo | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 # setup Node.js | |
| with: | |
| node-version: "22.x" | |
| - name: Install dependencies | |
| run: npm ci | |
| - uses: actions/checkout@v6 # checkout main branch of website repo | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| repository: OAI/spec.openapis.org | |
| ref: main | |
| path: deploy | |
| - name: run main script | |
| run: scripts/schema-publish.sh | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| branch: overlay-schema-iterations | |
| base: main | |
| delete-branch: true | |
| path: deploy | |
| labels: Overlay,Schema | |
| reviewers: earth2marsh,lornajane,mikekistler,miqui,baywet,ralfhandl | |
| title: "Overlay - publish schema iterations" | |
| commit-message: "New Overlay schema iterations published from ${{ github.ref_name }}" | |
| signoff: true | |
| body: | | |
| This pull request is automatically generated by GitHub action `schema-publish` in the OAI/Overlay-Specification repo. | |
| The `schemas/vX.Y/*.yaml` files have changed and JSON files are automatically generated. |