From 7d3c44714542be192ea4cea130f42b2550d83e86 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 1 Jul 2024 12:20:15 +0200 Subject: [PATCH] Do not clone submodules in forks. --- .github/workflows/danger.yml | 1 + .github/workflows/quality.yml | 6 ++++++ .github/workflows/tests.yml | 1 + 3 files changed, 8 insertions(+) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 405bb346c5..b4fd79e5dd 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -13,6 +13,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - run: | npm install --save-dev @babel/plugin-transform-flow-strip-types diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 52a0b10572..ff435ee988 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -23,6 +23,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: Run code quality check suite run: ./tools/check/check_code_quality.sh @@ -79,6 +80,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: Use JDK 17 uses: actions/setup-java@v4 @@ -117,6 +119,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: Use JDK 17 uses: actions/setup-java@v4 @@ -159,6 +162,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: Use JDK 17 uses: actions/setup-java@v4 @@ -197,6 +201,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: Use JDK 17 uses: actions/setup-java@v4 @@ -235,6 +240,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: Use JDK 17 uses: actions/setup-java@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb5dbd456c..a132fd7d14 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,6 +43,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + if: github.repository == 'element-hq/element-x-android' run: git submodule update --init --recursive - name: ☕️ Use JDK 17 uses: actions/setup-java@v4