From 56e87bf7b253843719f7503121d028b15c37ddd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 23 Dec 2023 14:07:40 -0300 Subject: [PATCH] Allow build & check extra packages To use, add "[ci check pkg1 pkg2 ...]" in PR title or body. --- .github/workflows/build.yaml | 2 ++ common/travis/changed_templates.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 031ff6e9243c2f..ac26a3cd8778db 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -69,6 +69,8 @@ jobs: BOOTSTRAP: '${{ matrix.config.host }}' TEST: '${{ matrix.config.test }}' HOSTREPO: /hostrepo + PR_TITLE: '${{ github.event.pull_request.title }}' + PR_BODY: '${{ github.event.pull_request.body }}' strategy: fail-fast: false diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh index 074c991d33afe4..958629b8fee9ab 100755 --- a/common/travis/changed_templates.sh +++ b/common/travis/changed_templates.sh @@ -2,6 +2,9 @@ # # changed_templates.sh +ci_check=$( echo -e "$PR_TITLE\n$PR_BODY" | + sed -ne 's/.*\[ci \+check \+\([^]]*[^ ]\) *].*/\1/p' ) + tip="$(git rev-list -1 --parents HEAD)" case "$tip" in # This is a merge commit, pick last parent @@ -27,3 +30,11 @@ git diff-tree -r --no-renames --name-only --diff-filter=AM \ xargs ./xbps-src sort-dependencies | tee /tmp/templates | sed "s/^/ /" >&2 + +if [ -n "$ci_check" ]; then + /bin/echo -e '\x1b[32mAdditional packages to build and check:\x1b[0m' + printf "%s\n" $ci_check | + xargs ./xbps-src sort-dependencies | + tee -a /tmp/templates | + sed "s/^/ /" >&2 +fi