-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.2 KB
/
copr-webhooks.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
name: COPR Webhook
on:
push:
branches:
- "main"
paths:
- "kernel/*"
- "t2linux-config/*"
- "t2linux-audio/*"
- "rust-tiny-dfr/*"
- "t2linux-repos/*"
- "rust-arraydeque/*"
- "rust-nonempty/*"
- "rust-rust-ini0.20/*"
- "t2fanrd/*"
- "linux-apfs-rw/*"
- "linux-apfs-rw-kmod/*"
- "t2linux-scripts/*"
- "t2linux-release/*"
jobs:
copr-webhook:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
submodules: recursive
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
since_last_remote_commit: true
dir_names: "true"
- name: "Trigger COPR webhook"
run: |
CHANGED_PACKAGES=( $(for c in ${CHANGES[@]}; do cut -d/ -f1<<<$c; done | sort -u) )
for package in "${CHANGED_PACKAGES[@]}"; do
echo "Running COPR webhook for: $package"
curl -sS -X POST $COPR_WEBHOOK/$package
done
env:
COPR_WEBHOOK: ${{ secrets.COPR_WEBHOOK }}
CHANGES: ${{ steps.changed-files.outputs.all_changed_files }}