Use PR label to trigger full packaging CI instead of PR body contents. (#13839)
Austin S. Hemmelgarn committed
Oct 18, 2022 at 08:30 UTC
bef28e9dd6f2087a02444848e6e6dea1a8fe5046
1 file changed
+6
-6
.github/workflows/packaging.yml
+6
-6
@@ -3,9 +3,13 @@
3
name: Packages
4
on:
5
pull_request:
6
+ types:
7
+ - opened
8
+ - reopened
9
+ - labeled
10
+ - synchronize
11
branches:
12
- master
8
- - develop
13
push:
14
branches:
15
- master
@@ -41,16 +45,12 @@ jobs:
45
- name: Read build matrix
46
id: set-matrix
47
shell: python3 {0}
44
- env:
45
- PR_BODY: "${{ github.event.pull_request.body }}"
48
run: |
49
from ruamel.yaml import YAML
50
import json
51
import re
52
import os
51
- FULL_CI_REGEX = '/actions run full ci'
53
ALWAYS_RUN_ARCHES = ["amd64", "x86_64"]
53
- PR_BODY = os.environ['PR_BODY']
54
yaml = YAML(typ='safe')
55
entries = list()
56
run_limited = False
@@ -58,7 +58,7 @@ jobs:
58
with open('.github/data/distros.yml') as f:
59
data = yaml.load(f)
60
61
- if "${{ github.event_name }}" == "pull_request" and re.search(FULL_CI_REGEX, PR_BODY, re.I) is None:
61
+ if "${{ github.event_name }}" == "pull_request" and "${{ contains(github.event.pull_request.labels.*.name, 'ci/packaging') }}" != "true":
62
run_limited = True
63
64
for i, v in enumerate(data['include']):