summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-04-22 02:27:08 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-04-22 17:19:18 +0200
commit7643d95bb31b2cc7412f3738be44a18fa8312cae (patch)
tree6e926d7d9fc949236546b8e581fcf661f72bb294 /.github/workflows
parentbf3b876a6378e1d808fb07250f643b047edef23e (diff)
downloadopenwrt-7643d95bb31b2cc7412f3738be44a18fa8312cae.tar.gz
CI: check-kernel-patches: upload proposed refreshed patches
Upload proposed refreshed patches if the check fails. This should help devs refresh the patches if they don't have access to a buildroot. Devs should ALWAYS refresh the patches before submitting and merging commits. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/check-kernel-patches.yml18
1 files changed, 16 insertions, 2 deletions
diff --git a/.github/workflows/check-kernel-patches.yml b/.github/workflows/check-kernel-patches.yml
index 50a6d1495c..bed70dbd19 100644
--- a/.github/workflows/check-kernel-patches.yml
+++ b/.github/workflows/check-kernel-patches.yml
@@ -131,14 +131,28 @@ jobs:
- name: Refresh Kernel patches
shell: su buildbot -c "sh -e {0}"
working-directory: openwrt
- run: |
- make target/linux/refresh V=s
+ run: make target/linux/refresh V=s
+ - name: Validate Refreshed Kernel Patches
+ working-directory: openwrt
+ run: |
. .github/workflows/scripts/ci_helpers.sh
if git diff --name-only --exit-code; then
success "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} seems ok"
else
err "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} require refresh. (run 'make target/linux/refresh' and force push this pr)"
+ err "You can also check the provided artifacts with the refreshed patch from this CI run."
+ mkdir ${{ env.TARGET }}-${{ env.SUBTARGET }}-refreshed
+ for f in $(git diff --name-only); do
+ cp --parents $f ${{ env.TARGET }}-${{ env.SUBTARGET }}-refreshed/
+ done
exit 1
fi
+
+ - name: Upload Refreshed Patches
+ if: failure()
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.TARGET }}-${{ env.SUBTARGET }}-refreshed
+ path: openwrt/${{ env.TARGET }}-${{ env.SUBTARGET }}-refreshed