From a56ac63ec0ba982f5a1cf4bfaa09a026320805da Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Thu, 13 Jul 2023 16:10:41 +0200 Subject: [PATCH] feat(ci): improve outputting dependencies if they are different --- .github/workflows/dependency-review.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 88c83642d66..aef6b754b60 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -52,12 +52,20 @@ jobs: echo "::error file=DEPENDENCIES,title=Rejected Dependencies found::Some dependencies are marked 'rejected', they cannot be used" exit 1 fi - - name: print expected DEPENDENCIES file - run: | - cat DEPENDENCIES-gen - name: Check for differences run: | - diff DEPENDENCIES DEPENDENCIES-gen + if diff DEPENDENCIES DEPENDENCIES-gen ; then + echo "DEPENDENCIES up-do-date" + else + diff DEPENDENCIES DEPENDENCIES-gen + echo "------------------------------------------------------------" + echo "Please copy the following content back to DEPENDENCIES" + cat DEPENDENCIES-gen + echo "end of content" + echo "::error file=DEPENDENCIES,title=Dependencies outdated::The DEPENDENCIES file was outdated and must be regenerated. Check the output of this job for more information" + exit 1 + fi + Dependency-Analysis: runs-on: ubuntu-latest