Skip to content

Merge pull request #302 from OAI/workflows-with-app-token #7

Merge pull request #302 from OAI/workflows-with-app-token

Merge pull request #302 from OAI/workflows-with-app-token #7

name: schema-publish
# author: @ralfhandl
#
# This workflow copies the x.y schemas to the gh-pages branch
#
# run this on push to main
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
publish:
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
- uses: actions/setup-node@v4 # setup Node.js
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- uses: actions/checkout@v4 # checkout gh-pages branch
with:
token: ${{ steps.generate-token.outputs.token }}
repository: OAI/OpenAPI-Specification
ref: gh-pages
path: deploy
- name: run main script
run: scripts/schema-publish.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
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,ralfhandl
title: Arazzo - Publish Schema Iterations
commit-message: New Arazzo schema iterations
signoff: true
body: |
This pull request is automatically triggered by GitHub action `schema-publish` in the OAI/Arazzo-Specification repo.
The `schemas/**/*.yaml` files have changed and JSON files are automatically generated.