Skip to content

Check OpenAPI updates #23

Check OpenAPI updates

Check OpenAPI updates #23

name: Check OpenAPI updates
on:
schedule:
- cron: "*/5 * * * *" # every 5 minutes (for testing)
# - cron: "0 16 * * *" # every day at 4pm UTC
jobs:
check-open-api-spec-updates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check OpenAPI updates
run: make openapi-spec-check-updates
on-failure:
runs-on: ubuntu-latest
if: ${{ always() && (needs.check-open-api-spec-updates.result == 'failure' || needs.check-open-api-spec-updates.result == 'timed_out') }}
needs:
- check-open-api-spec-updates
steps:
- uses: actions/checkout@v4
- name: Send Slack notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: proj-cli
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMOJI: ':launchdarkly:'
SLACK_TITLE: ':warning: The OpenAPI spec has changed and resources need to be updated.'
SLACK_USERNAME: github
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}