From c045462c1f0fd4791c00b4c91c7bb304a5e55fb8 Mon Sep 17 00:00:00 2001 From: Jan Michalski Date: Tue, 19 Mar 2024 16:52:30 -0400 Subject: [PATCH] common: Main / Check license add upload step --- .github/workflows/main.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 76cafb5b014..e2eef50cc19 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,12 +36,30 @@ jobs: sudo pip install flake8 sudo apt-get install clang-format-14 - - name: Check licenses + - name: Check license + id: check_license + continue-on-error: true env: NDCTL_ENABLE: n # just to speed up the job PMEMOBJ_IGNORE_DIRTY_SHUTDOWN: y # not recommended for production PMEMOBJ_IGNORE_BAD_BLOCKS: y # not recommended for production - run: make -j$(nproc) check-license + run: | + make -j$(nproc) check-license || true + git diff > /tmp/check-license.diff + [ $(cat /tmp/check-license.diff | wc -l ) -gt 0 ] && exit 1 + exit 0 + + - name: Upload check license diff + if: steps.check_license.outcome != 'success' + uses: actions/upload-artifact@v4 + with: + name: check-license.diff + path: /tmp/check-license.diff + + - name: Check license - Exit code + run: | + [ "${{steps.check_license.outcome}}" != "success" ] && exit 1 + exit 0 - name: Check style env: