From 42ed9a6d24345c7590467ba3468137a19927d733 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 17 Dec 2024 12:59:46 +0100 Subject: [PATCH 1/5] Update schema-publish.yaml (#294) Temporarily remove myself from the reviewers list --- .github/workflows/schema-publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/schema-publish.yaml b/.github/workflows/schema-publish.yaml index 70bac29..964a8ae 100644 --- a/.github/workflows/schema-publish.yaml +++ b/.github/workflows/schema-publish.yaml @@ -50,7 +50,7 @@ jobs: delete-branch: true path: deploy labels: Housekeeping,Schema - reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews + reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews title: Publish Arazzo Schema Iterations commit-message: New Arazzo schema iterations signoff: true From 0615263f770f257887fafc71394de67f7753472a Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 17 Dec 2024 14:25:55 +0100 Subject: [PATCH 2/5] spec build workflow: dynamically determine latest spec version (#296) * Update spec build workflow - Use release tag to determine latest spec version * Update respec.yaml * Update respec.yaml --- .github/workflows/respec.yaml | 20 ++++++++++++-------- scripts/md2html/build.sh | 3 +-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index 8429aa8..b132ec4 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -14,7 +14,6 @@ on: - 'versions/**' branches: - main - workflow_dispatch: {} jobs: @@ -23,14 +22,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 # checkout main branch + - uses: actions/checkout@v4 # checkout main branch with: fetch-depth: 0 + - uses: actions/setup-node@v4 # setup Node.js + with: + node-version: '20.x' + - name: Install dependencies - run: npm i + run: npm ci - - uses: actions/checkout@v2 # checkout gh-pages branch + - uses: actions/checkout@v4 # checkout gh-pages branch with: token: ${{ secrets.OAS_REPO_TOKEN }} repository: OAI/OpenAPI-Specification @@ -43,7 +46,7 @@ jobs: # need to create a pull request against a reomte repository here # to update the gh-pages branch on the OAI repo - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.OAS_REPO_TOKEN }} branch: update-arazzo-respec-version @@ -51,12 +54,13 @@ jobs: delete-branch: true path: deploy labels: Housekeeping - title: Update ReSpec versions for Arazzo - commit-message: Update ReSpec versions + reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,handrews,karenetheridge # ralfhandl + title: Arazzo - 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`. - The versions/v*.md files of the Arazzo Specification have changed, so the HTML files are automatically being regenerated. + The `versions/*.md` files of the Arazzo Specification have changed, so the HTML files are automatically being regenerated. diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index 82f03a9..7b3db4a 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -14,8 +14,7 @@ cd scripts/md2html # temporarily copy installed version of respec into build directory cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/ -# latest=`git describe --abbrev=0 --tags` -- introduce after release tags created -latest=1.0.0 +latest=`git describe --abbrev=0 --tags` latestCopied=none lastMinor="-" for filename in $(ls -1 ../../versions/[123456789].*.md | sort -r) ; do From 7924d7f139fc8c413b6a3cf8785c7a67b54e78b8 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Sun, 22 Dec 2024 22:42:33 +0100 Subject: [PATCH 3/5] Use app-generated access token --- .github/workflows/schema-publish.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/schema-publish.yaml b/.github/workflows/schema-publish.yaml index 964a8ae..966f31a 100644 --- a/.github/workflows/schema-publish.yaml +++ b/.github/workflows/schema-publish.yaml @@ -18,6 +18,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Generate access token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} + private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} + owner: OAI + repositories: OpenAPI-Specification + - uses: actions/checkout@v4 # checkout main branch with: fetch-depth: 0 @@ -31,7 +40,7 @@ jobs: - uses: actions/checkout@v4 # checkout gh-pages branch with: - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} repository: OAI/OpenAPI-Specification ref: gh-pages path: deploy @@ -42,16 +51,14 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: - # A personal access token is required to push changes to the repository. - # This token needs to be refreshed regularly and stored in the repository secrets. - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} branch: publish-arazzo-schema-iteration base: gh-pages delete-branch: true path: deploy labels: Housekeeping,Schema - reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews - title: Publish Arazzo Schema Iterations + reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl + title: Arazzo - Publish Schema Iterations commit-message: New Arazzo schema iterations signoff: true body: | From 46a8c775aa408138ba9c69494a676fb0f43d0ef4 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Sun, 22 Dec 2024 22:51:55 +0100 Subject: [PATCH 4/5] Use app-generated access token --- .github/workflows/respec.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index b132ec4..a5d6cd6 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -22,6 +22,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Generate access token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }} + private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }} + owner: OAI + repositories: OpenAPI-Specification + - uses: actions/checkout@v4 # checkout main branch with: fetch-depth: 0 @@ -35,7 +44,7 @@ jobs: - uses: actions/checkout@v4 # checkout gh-pages branch with: - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} repository: OAI/OpenAPI-Specification ref: gh-pages path: deploy @@ -48,13 +57,13 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: - token: ${{ secrets.OAS_REPO_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} branch: update-arazzo-respec-version base: gh-pages delete-branch: true path: deploy labels: Housekeeping - reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,handrews,karenetheridge # ralfhandl + reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,handrews,karenetheridge,ralfhandl title: Arazzo - Update ReSpec-rendered specification versions commit-message: Update ReSpec-rendered specification versions signoff: true From a32e5934cb8368fd720cffd0c1e46f9ebe0edbd0 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Mon, 23 Dec 2024 10:51:21 +0100 Subject: [PATCH 5/5] Use working ubuntu --- .github/workflows/respec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/respec.yaml b/.github/workflows/respec.yaml index a5d6cd6..ee1cae6 100644 --- a/.github/workflows/respec.yaml +++ b/.github/workflows/respec.yaml @@ -19,7 +19,7 @@ on: jobs: respec: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate access token