Skip to content

Update catalog from a fresh OpenAPI spec #101

Update catalog from a fresh OpenAPI spec

Update catalog from a fresh OpenAPI spec #101

name: Update catalog from a fresh OpenAPI spec
on:
schedule:
# Run daily at 12 PM UTC
- cron: '0 12 * * *'
workflow_dispatch: # Allow manual triggers
env:
FORCE_COLOR: "1"
jobs:
update-catalog:
name: Update catalog from Greenhouse OpenAPI Spec
runs-on: ubuntu-latest
permissions:
contents: write # General permission to create and update the repo contents
pull-requests: write # Permission to create and update pull requests
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: .python-version
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Run catalog updater
run: uv run python scripts/update_catalog.py
- name: Check for changes
continue-on-error: true
id: git-check
run: |
git diff --exit-code tap_greenhouse/schemas || echo "changed=true" >> $GITHUB_OUTPUT
- name: Open a Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
if: steps.git-check.outputs.changed == 'true'
with:
title: 'fix: Update catalog'
commit-message: 'fix: Update catalog'
body: |
Updated the tap catalog by downloading a fresh OpenAPI spec.
signoff: true