From a6d15fc667e849a21f10f360c9bc83b55fd656ca Mon Sep 17 00:00:00 2001 From: vivekkr0311 Date: Wed, 2 Sep 2026 17:09:19 +0530 Subject: [PATCH] Attempt to fix CI --- .github/workflows/ci.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1925b385..39847151 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,10 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + run: | + if [ -d "${HOME}/.m2/repository" ]; then + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + fi - name: "Build" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} env: @@ -180,7 +183,10 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + run: | + if [ -d "${HOME}/.m2/repository" ]; then + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + fi - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} env: @@ -235,7 +241,10 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + run: | + if [ -d "${HOME}/.m2/repository" ]; then + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + fi - name: "Build local docker image" timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} env: @@ -286,7 +295,10 @@ jobs: - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v18.21.0 - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v18.21.0 - name: "Clean-up SNAPSHOT artifacts" - run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + run: | + if [ -d "${HOME}/.m2/repository" ]; then + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + fi - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v18.21.0 with: username: ${{ secrets.BOT_GITHUB_USERNAME }} @@ -364,7 +376,10 @@ jobs: echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json sudo service docker restart - name: "Clean-up SNAPSHOT artifacts" - run: find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + run: | + if [ -d "${HOME}/.m2/repository" ]; then + find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" -prune -exec rm -rf {} + + fi - name: "Cache LibreOffice" run: bash _ci/cache_artifacts.sh # Builds the module(s) and pushes the multi-arch Docker image(s). The Maven