[LTP] [PATCH v7 4/4] ci: apply patchwork series in ci-docker-build workflow
Andrea Cervesato
andrea.cervesato@suse.de
Tue Apr 15 18:39:40 CEST 2025
From: Andrea Cervesato <andrea.cervesato@suse.com>
Modify ci-docker-build workflow in order to apply untested new
patchwork patch-series inside the current branch and to send back
results in the patchwork instance.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
.github/workflows/ci-docker-build.yml | 39 ++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml
index 44dcca055018a1fb06541a788e3152239aea2e66..b476d993c50a3369efdaa9a72787a7f006cfe0b9 100644
--- a/.github/workflows/ci-docker-build.yml
+++ b/.github/workflows/ci-docker-build.yml
@@ -1,7 +1,19 @@
# Copyright (c) 2021-2024 Petr Vorel <pvorel@suse.cz>
name: "Test building in various distros in Docker"
-on: [push, pull_request]
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+ inputs:
+ SERIES_ID:
+ description: LTP patch series ID
+ required: false
+ default: ''
+ SERIES_MBOX:
+ description: LTP patch series URL
+ required: false
+ default: ''
permissions:
contents: read # to fetch code (actions/checkout)
@@ -125,6 +137,20 @@ jobs:
- name: Compiler version
run: $CC --version
+ - name: Apply Patchwork series
+ if: inputs.SERIES_ID != '' && inputs.SERIES_MBOX != ''
+ env:
+ PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }}
+ run: |
+ git config --global user.name 'GitHub CI'
+ git config --global user.email 'github@example.com'
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
+
+ git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}"
+ curl -k "${{ inputs.SERIES_MBOX }}" | git am
+
+ ./ci/tools/patchwork.sh state "${{ inputs.SERIES_ID }}" "needs-review-ack"
+
- name: ver_linux
run: ./ver_linux
@@ -158,3 +184,14 @@ jobs:
run: |
if [ "$MAKE_INSTALL" = 1 ]; then INSTALL_OPT="-i"; fi
./build.sh -r install -o ${TREE:-in} $INSTALL_OPT
+
+ - name: Send results to Patchwork
+ if: always() && inputs.SERIES_ID != '' && inputs.SERIES_MBOX != ''
+ env:
+ PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }}
+ run: |
+ ./ci/tools/patchwork.sh check \
+ "${{ inputs.SERIES_ID }}" \
+ "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
+ "${{ matrix.container }}" \
+ "${{ job.status }}"
--
2.43.0
More information about the ltp
mailing list