@cryptotaxi247 / netdata-1 / commits / e237aae7b

Sanely handle very large PR bodies in package build CI matrix generation. (#12218)

Austin S. Hemmelgarn committed Mar 16, 2022 at 07:34 UTC e237aae7bb8b39a5a276025de1525be4499b1fc1
1 file changed +2 -4
.github/workflows/packaging.yml
+2 -4
@@ -41,15 +41,13 @@ jobs:
41 - name: Read build matrix
42 id: set-matrix
43 shell: python3 {0}
44 - env:
45 - PR_BODY: ${{ github.event.pull_request.body }}
44 run: |
45 from ruamel.yaml import YAML
46 import json
49 - import os
47 import re
48 FULL_CI_REGEX = '/actions run full ci'
49 ALWAYS_RUN_ARCHES = ["amd64"]
50 + PR_BODY = """${{ github.event.pull_request.body }}"""
51 yaml = YAML(typ='safe')
52 entries = list()
53 run_limited = False
@@ -57,7 +55,7 @@ jobs:
55 with open('.github/data/distros.yml') as f:
56 data = yaml.load(f)
57
60 - if "${{ github.event_name }}" == "pull_request" and re.search(FULL_CI_REGEX, os.environ["PR_BODY"], re.I) is None:
58 + if "${{ github.event_name }}" == "pull_request" and re.search(FULL_CI_REGEX, PR_BODY, re.I) is None:
59 run_limited = True
60
61 for i, v in enumerate(data['include']):