diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index 53b904d..5bd1f90 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -1,14 +1,13 @@ name: respec -# author: @MikeRalphson +# author: @MikeRalphson, @ralfhandl # issue: https://github.com/OAI/OpenAPI-Specification/issues/1564 # -# This workflow updates the respec 'pretty' rendered versions of the spec -# on the gh-pages branch when the corresponding markdown files change. +# This workflow creates a pull request for publishing HTML spec versions to the spec.openapis.org site. # -# run this on push of new spec versions to main +# run this manually or on push of new spec versions to main on: push: paths: @@ -31,9 +30,9 @@ jobs: app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} owner: OAI - repositories: OpenAPI-Specification + repositories: spec.openapis.org - - uses: actions/checkout@v5 # checkout main branch + - uses: actions/checkout@v5 # checkout main branch of this repo with: fetch-depth: 0 @@ -44,11 +43,11 @@ jobs: - name: Install dependencies run: npm ci - - uses: actions/checkout@v5 # checkout gh-pages branch + - uses: actions/checkout@v5 # checkout main branch of website repo with: token: ${{ steps.generate-token.outputs.token }} - repository: OAI/OpenAPI-Specification # TODO: change to OAI/... - ref: gh-pages + repository: OAI/spec.openapis.org + ref: main path: deploy - name: run main script @@ -58,16 +57,16 @@ jobs: uses: peter-evans/create-pull-request@v7 with: token: ${{ steps.generate-token.outputs.token }} - branch: update-overlay-respec-version - base: gh-pages + branch: overlay-spec-versions + base: main delete-branch: true path: deploy - labels: Housekeeping - reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl - title: Overlay - Update ReSpec-rendered specification versions + labels: Overlay,Specification + reviewers: earth2marsh,lornajane,mikekistler,miqui,baywet,ralfhandl + title: Overlay - update ReSpec-rendered specification versions commit-message: Update ReSpec-rendered specification versions signoff: true body: | - This pull request is automatically triggered by GitHub action `respec` in the OAI/Overlay-Specification repo. + This pull request is automatically generated by GitHub action `respec` in the OAI/Overlay-Specification repo. - The `versions/*.md` files have changed, so the HTML files are automatically being regenerated. + The `versions/*.md` files of the OpenAPI Specification have changed and the corresponding HTML files are regenerated. diff --git a/.github/workflows/schema-publish.yaml b/.github/workflows/schema-publish.yaml index 29ba93a..6abd54b 100644 --- a/.github/workflows/schema-publish.yaml +++ b/.github/workflows/schema-publish.yaml @@ -3,12 +3,14 @@ name: schema-publish # author: @ralfhandl # -# This workflow copies the x.y schemas to the gh-pages branch +# This workflow creates a pull request for publishing schema iterations to the spec.openapis.org site. # -# run this on push to main +# run this on changes to schemas to main on: push: + paths: + - "schemas/**" branches: - main workflow_dispatch: {} @@ -26,9 +28,9 @@ jobs: app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} owner: OAI - repositories: OpenAPI-Specification - - - uses: actions/checkout@v5 # checkout main branch + repositories: spec.openapis.org + + - uses: actions/checkout@v5 # checkout main branch of this repo with: fetch-depth: 0 @@ -39,11 +41,11 @@ jobs: - name: Install dependencies run: npm ci - - uses: actions/checkout@v5 # checkout gh-pages branch + - uses: actions/checkout@v5 # checkout main branch of website repo with: token: ${{ steps.generate-token.outputs.token }} - repository: OAI/OpenAPI-Specification - ref: gh-pages + repository: OAI/spec.openapis.org + ref: main path: deploy - name: run main script @@ -53,15 +55,15 @@ jobs: uses: peter-evans/create-pull-request@v7 with: token: ${{ steps.generate-token.outputs.token }} - branch: publish-overlay-schema-iteration - base: gh-pages + branch: overlay-schema-iterations + base: main delete-branch: true path: deploy - labels: Housekeeping,Schema - reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl - title: Overlay - Publish Schema Iterations - commit-message: New Overlay schema iterations + 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 triggered by GitHub action `schema-publish` in the OAI/Overlay-Specification repo. + This pull request is automatically generated by GitHub action `schema-publish` in the OAI/Overlay-Specification repo. The `schemas/**/*.yaml` files have changed and JSON files are automatically generated.