Skip to content

Fetch Hookdeck OpenAPI #11063

Fetch Hookdeck OpenAPI

Fetch Hookdeck OpenAPI #11063

Workflow file for this run

name: Fetch Hookdeck OpenAPI
on:
workflow_dispatch: # Manually trigger the workflow
schedule:
- cron: "*/15 * * * *"
permissions:
contents: write
pull-requests: write
jobs:
fetch-openapi:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Fetch OpenAPI
run: curl https://api.hookdeck.com/latest/openapi/fern | jq . > fern/openapi/openapi.json
- name: Check for Changes
id: git-status
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
- name: Create Pull Request
if: steps.git-status.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update OpenAPI specification"
base: main
branch: fern/updateOAS
author: GitHub Actions <[email protected]>
delete-branch: true
title: "Update OpenAPI specification"
body: "This PR updates the OpenAPI specification."