forked from qutebrowser/qutebrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (79 loc) · 3.19 KB
/
recompile-requirements.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Update dependencies
on:
schedule:
# Every Monday at 04:05 UTC
# https://crontab.guru/#05_04_*_*_1
- cron: '05 04 * * 1'
workflow_dispatch:
inputs:
environments:
description: 'Test environments to update'
required: false
default: ''
jobs:
update:
if: "github.repository == 'qutebrowser/qutebrowser'"
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Recompile requirements
run: "python3 scripts/dev/recompile_requirements.py ${{ github.event.input.environments }}"
id: requirements
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libyaml-dev libegl1-mesa libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-shape0 libxcb-cursor0 asciidoc python3-venv xvfb
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U -r misc/requirements/requirements-tox.txt
- name: Run mkvenv.py
run: "xvfb-run python3 scripts/mkvenv.py --dev"
- name: Run qutebrowser smoke test
run: "xvfb-run .venv/bin/python3 -m qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ':later 500 quit'"
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
committer: qutebrowser bot <bot@qutebrowser.org>
author: qutebrowser bot <bot@qutebrowser.org>
token: ${{ secrets.QUTEBROWSER_BOT_TOKEN }}
commit-message: Update dependencies
title: Update dependencies
body: |
## Changed files
${{ steps.requirements.outputs.changed }}
## Version updates
${{ steps.requirements.outputs.diff }}
---
I'm a bot, bleep, bloop. :robot:
branch: update-dependencies
irc:
timeout-minutes: 2
continue-on-error: true
runs-on: ubuntu-latest
needs: [update]
if: "always() && github.repository == 'qutebrowser/qutebrowser'"
steps:
- name: Send success IRC notification
uses: Gottox/irc-message-action@v2
if: "needs.update.result == 'success'"
with:
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
- name: Send non-success IRC notification
uses: Gottox/irc-message-action@v2
if: "needs.update.result != 'success'"
with:
server: irc.libera.chat
channel: '#qutebrowser-bots'
nickname: qutebrowser-bot
message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"