-
Notifications
You must be signed in to change notification settings - Fork 60
40 lines (40 loc) · 1.28 KB
/
bugzilla_github.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
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by bootstrap.py. Please use
# bootstrap.py to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
---
name: Bugzilla Github
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 */1 * * *'
workflow_dispatch:
jobs:
github_bugzilla:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Bugzilla automation script
env:
GITHUB_API_TOKEN: ${{ secrets.PULPBOT_GH_TOKEN }}
BUGZILLA_API_KEY: ${{ secrets.BUGZILLA_API_KEY }}
run: |
pip install requests python-bugzilla pygithub urllib3 pyopenssl
export PYTHONBUGZILLA_REQUESTS_TIMEOUT=3600
python ./ci/github_bugzilla.py
- name: After failure
if: failure()
run: |
echo ::group::sendmail
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install sendmail
pip install dynaconf
sudo systemctl restart sendmail
echo ::endgroup::
python .github/send_email.py