-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.57 KB
/
check-api-outdated.yml
File metadata and controls
57 lines (49 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Open API
on:
push:
branches-ignore:
- "github-pages/*"
- "gh-pages/*"
pull_request:
# check results of former push could be outdated
types: [opened, reopened]
workflow_dispatch:
schedule:
# "At 2 am UTC on Monday." (https://crontab.guru)
- cron: "0 2 * * 1"
jobs:
check-api-outdated:
name: Check API Outdated
runs-on: ubuntu-24.04
permissions:
contents: read
actions: read
strategy:
fail-fast: false
steps:
- name: SCM Checkout
uses: actions/checkout@v6
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v5
with:
python-version: "3.10"
poetry-version: "2.3.0"
- name: Run Nox Task api:check-outdated
run: poetry run -- nox -s api:check-outdated
- name: Report Failure Status to Slack Channel
if: ${{ failure() && github.event_name == 'schedule' }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
token: ${{ github.token }}
notification_title: "Generated OpenAPI seems to be outdated."
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
notify_when: "failure,cancelled,warnings,skipped"
env:
SLACK_WEBHOOK_URL: ${{ secrets.INTEGRATION_TEAM_SLACK_NOTIFICATION_WEBHOOK }}
- name: Upload openapi.json
if: ${{ failure() }}
uses: actions/upload-artifact@v6
with:
name: openapi.json
path: openapi.json