-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.51 KB
/
check_openapi_versions.yml
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
name: Run Python Script
on:
# Run the workflow every day at midnight (00:00) UTC.
workflow_dispatch: # Allows manual triggering
schedule:
- cron: '0 0 * * *'
jobs:
run-python-script:
runs-on: ubuntu-latest # Use Ubuntu as the runner environment
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12' # Specify the Python version (e.g., '3.x')
# Step 3: Install dependencies (optional, if your script has requirements)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
# Step 4: Run your Python script
- name: Run Python script
id: check_openapi_version
run: python ./scripts/check_openapi_version.py
- name: Send notification
if: failure()
uses: dawidd6/action-send-mail@v2
with:
server_address: email-smtp.eu-central-1.amazonaws.com
server_port: 465
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: "[Plenigo][WARNING] Plenigo openapi spec version mismatch"
html_body: file://output.log
to: plenigo_openapi_spec-aaaaooflpibdbm4k3xoaxq7uye@spring-media.slack.com
from: '"User" <[email protected]>' # <[email protected]>