From 1b39472cda53cf8bf78e59b3d7ef5c13345c1770 Mon Sep 17 00:00:00 2001 From: Damian Ujma Date: Mon, 28 Oct 2024 14:52:22 +0100 Subject: [PATCH] ACS-8920 Fix pre-commit job [skip ci] --- .github/workflows/ci.yml | 8 ++++++++ scripts/check-format-and-headers.sh | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 875069c0..f3594eee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,14 @@ jobs: if: > !contains(github.event.head_commit.message, '[release]') steps: + - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - id: changed-files + uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v7.0.0 + with: + write-list-to-env: true - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v7.0.0 veracode_sca: diff --git a/scripts/check-format-and-headers.sh b/scripts/check-format-and-headers.sh index 4143da16..7cf66260 100755 --- a/scripts/check-format-and-headers.sh +++ b/scripts/check-format-and-headers.sh @@ -7,6 +7,12 @@ else modified_files=${GITHUB_MODIFIED_FILES} fi +if [[ -z ${modified_files} ]] +then + echo "No modified files, exiting." + exit 0 +fi + include_list="" for file in ${modified_files} do