-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (40 loc) · 1.16 KB
/
diff-channels.yml
File metadata and controls
47 lines (40 loc) · 1.16 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
name: Diff channels
on:
pull_request:
paths:
- channels.yml
- channels.schema.yml
jobs:
diff-channels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: pr-base
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Cache dependencies
uses: actions/cache@v3
id: cache-dep
with:
path: venv
key: deps-1-${{ hashfiles('script/requirements.txt') }}
- name: Install Dependencies
run: |
python3 -m venv venv
venv/bin/pip install -U pip wheel
venv/bin/pip install -r script/requirements.txt
venv/bin/pip install .
- name: Diff channels
run: |
source venv/bin/activate
python -m sr.discord_bot diff pr-base/channels.yml channels.yml > /tmp/channel-diff.txt
- name: Post diff as comment on PR
uses: thollander/actions-comment-pull-request@v3
with:
file-path: /tmp/channel-diff.txt
comment-tag: execution