Notify expired API docs #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Notify expired API docs | |
on: | |
schedule: | |
- cron: '5 12 * * 1-5' # 12:05 UTC, Monday to Friday | |
workflow_dispatch: | |
inputs: | |
dry_run: | |
description: Dry run (does not send Slack notification) | |
required: false | |
default: true | |
type: boolean | |
jobs: | |
slack-notification: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
working-directory: src/explore-education-statistics-api-docs | |
- name: Notify expired docs | |
working-directory: src/explore-education-statistics-api-docs | |
run: bundle exec rake notify:expired | |
env: | |
HOST_URL: ${{ vars.API_DOCS_URL }} | |
REALLY_POST_TO_SLACK: ${{ (github.event_name == 'schedule') && 1 || (github.event.inputs.dry_run == 'false') && 1 || 0 }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERTS_WEBHOOK_URL }} | |
OVERRIDE_SLACK_MESSAGE_PREFIX: Please ensure that the Public API documentation is up to date. |