diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 293a4d8cca..0a3e430f8b 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -15,6 +15,7 @@ jobs: with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - run: | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c2e9aa7877..48b20c460f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,6 +14,7 @@ jobs: nightly: name: Build and publish nightly bundle to Firebase runs-on: ubuntu-latest + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/nightlyReports.yml b/.github/workflows/nightlyReports.yml index 6aa6c151a7..196f2f17d6 100644 --- a/.github/workflows/nightlyReports.yml +++ b/.github/workflows/nightlyReports.yml @@ -15,6 +15,7 @@ jobs: nightlyReports: name: Create kover report artifact and upload sonar result. runs-on: ubuntu-latest + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} steps: - name: ⏬ Checkout with LFS diff --git a/.github/workflows/nightly_enterprise.yml b/.github/workflows/nightly_enterprise.yml index 31077c7998..d9bd0c0eab 100644 --- a/.github/workflows/nightly_enterprise.yml +++ b/.github/workflows/nightly_enterprise.yml @@ -14,6 +14,7 @@ jobs: nightly: name: Build and publish Enterprise nightly bundle to Firebase runs-on: ubuntu-latest + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index c9a218a542..f37be815f4 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -20,10 +20,12 @@ jobs: - uses: actions/checkout@v4 - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: Run code quality check suite @@ -78,10 +80,12 @@ jobs: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: Use JDK 17 @@ -118,10 +122,12 @@ jobs: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: Use JDK 17 @@ -162,10 +168,12 @@ jobs: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: Use JDK 17 @@ -202,10 +210,12 @@ jobs: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: Use JDK 17 @@ -242,10 +252,12 @@ jobs: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: Use JDK 17 @@ -277,6 +289,7 @@ jobs: name: Project Check Suite runs-on: ubuntu-latest needs: [konsist, lint, ktlint, detekt] + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69872d577a..59716b2f6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,7 @@ jobs: enterprise: name: Create App Bundle Enterprise runs-on: ubuntu-latest + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} concurrency: group: ${{ format('build-release-main-enterprise-{0}', github.sha) }} @@ -50,6 +51,7 @@ jobs: - uses: actions/checkout@v4 - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8188b2fbb3..0004572927 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,10 +40,12 @@ jobs: ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - name: Add SSH private keys for submodule repositories uses: webfactory/ssh-agent@v0.9.0 + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} with: ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} - name: Clone submodules + # Skip in forks if: ${{ github.repository == 'element-hq/element-x-android' }} run: git submodule update --init --recursive - name: ☕️ Use JDK 17