diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index c770fb248a..f3bc0985ba 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -17,15 +17,7 @@ jobs: runs-on: ubuntu-24.04 # Only react to merged PRs for security reasons. # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. - if: > - github.event.pull_request.merged - && ( - github.event.action == 'closed' - || ( - github.event.action == 'labeled' - && contains(github.event.label.name, 'backport') - ) - ) + if: ${{ github.repository == 'element-hq/element-web' && (github.event.pull_request.merged && ( github.event.action == 'closed' || ( github.event.action == 'labeled' && contains(github.event.label.name, 'backport') ) )) }} steps: - uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2 with: diff --git a/.github/workflows/build-and-test-netlify.yaml b/.github/workflows/build-and-test-netlify.yaml index 1b3aa2bd69..42bf6a017f 100644 --- a/.github/workflows/build-and-test-netlify.yaml +++ b/.github/workflows/build-and-test-netlify.yaml @@ -17,7 +17,7 @@ permissions: {} jobs: report: - if: github.event.workflow_run.conclusion != 'cancelled' + if: ${{ github.repository == 'element-hq/element-web' && (github.event.workflow_run.conclusion != 'cancelled') }} name: Report results runs-on: ubuntu-24.04 environment: Netlify diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index e53881a471..7097251c72 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -50,7 +50,7 @@ jobs: build_ew: name: "Build Element Web" runs-on: ubuntu-24.04 - if: inputs.skip != true + if: ${{ github.repository == 'element-hq/element-web' && (inputs.skip != true) }} outputs: num-runners: ${{ env.NUM_RUNNERS }} runners-matrix: ${{ steps.runner-vars.outputs.matrix }} @@ -104,7 +104,7 @@ jobs: playwright_ew: name: "Run Tests [${{ matrix.project }}] ${{ matrix.runner }}/${{ needs.build_ew.outputs.num-runners }}" needs: build_ew - if: needs.build_ew.outputs.skip == 'false' + if: ${{ github.repository == 'element-hq/element-web' && (needs.build_ew.outputs.skip == 'false') }} runs-on: ubuntu-24.04 permissions: actions: read @@ -184,7 +184,7 @@ jobs: downstream-modules: name: Downstream Playwright tests [element-modules] needs: build_ew - if: needs.build_ew.outputs.skip == 'false' && github.event_name == 'merge_group' + if: ${{ github.repository == 'element-hq/element-web' && (needs.build_ew.outputs.skip == 'false' && github.event_name == 'merge_group') }} uses: element-hq/element-modules/.github/workflows/reusable-playwright-tests.yml@main # zizmor: ignore[unpinned-uses] with: webapp-artifact: webapp @@ -194,7 +194,7 @@ jobs: name: "Prepare Element Desktop" uses: ./.github/workflows/build_desktop_prepare.yaml needs: build_ew - if: needs.build_ew.outputs.skip == 'false' + if: ${{ github.repository == 'element-hq/element-web' && (needs.build_ew.outputs.skip == 'false') }} permissions: contents: read with: @@ -207,7 +207,7 @@ jobs: name: "Desktop Windows" uses: ./.github/workflows/build_desktop_windows.yaml # Skip Windows builds on PRs, as the Linux amd64 build is enough of a smoke test and includes the screenshot tests - if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'X-Run-All-Tests') + if: ${{ github.repository == 'element-hq/element-web' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'X-Run-All-Tests')) }} strategy: matrix: arch: [x64, ia32, arm64] @@ -216,6 +216,7 @@ jobs: blob_report: true build_ed_linux: + if: ${{ github.repository == 'element-hq/element-web' }} needs: prepare_ed name: "Desktop Linux" uses: ./.github/workflows/build_desktop_linux.yaml @@ -243,7 +244,7 @@ jobs: uses: ./.github/workflows/build_desktop_macos.yaml # Skip macOS builds on PRs, as the Linux amd64 build is enough of a smoke test and includes the screenshot tests # and we have a very low limit of concurrent macos runners (5) across the Github org. - if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'X-Run-All-Tests') + if: ${{ github.repository == 'element-hq/element-web' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'X-Run-All-Tests')) }} with: blob_report: true @@ -257,7 +258,7 @@ jobs: - build_ed_windows - build_ed_linux - build_ed_macos - if: always() + if: ${{ github.repository == 'element-hq/element-web' && (always()) }} runs-on: ubuntu-24.04 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 diff --git a/.github/workflows/build_debian.yaml b/.github/workflows/build_debian.yaml index 24fe492e7c..c9823ec1db 100644 --- a/.github/workflows/build_debian.yaml +++ b/.github/workflows/build_debian.yaml @@ -6,6 +6,7 @@ concurrency: ${{ github.workflow }} permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: build: + if: ${{ github.repository == 'element-hq/element-web' }} name: Build package environment: packages.element.io runs-on: ubuntu-24.04 diff --git a/.github/workflows/build_desktop_and_deploy.yaml b/.github/workflows/build_desktop_and_deploy.yaml index e7cd849432..7a6f22db13 100644 --- a/.github/workflows/build_desktop_and_deploy.yaml +++ b/.github/workflows/build_desktop_and_deploy.yaml @@ -44,6 +44,7 @@ env: permissions: {} # Uses ELEMENT_BOT_TOKEN jobs: prepare: + if: ${{ github.repository == 'element-hq/element-web' }} uses: ./.github/workflows/build_desktop_prepare.yaml permissions: contents: read @@ -57,6 +58,7 @@ jobs: CF_R2_TOKEN: ${{ secrets.CF_R2_TOKEN }} trigger-pro-pipeline: + if: ${{ github.repository == 'element-hq/element-web' }} name: Trigger Pro pipeline needs: prepare runs-on: ubuntu-24.04 @@ -72,7 +74,7 @@ jobs: } windows: - if: github.event_name != 'workflow_dispatch' || inputs.windows + if: ${{ github.repository == 'element-hq/element-web' && (github.event_name != 'workflow_dispatch' || inputs.windows) }} needs: prepare name: Windows ${{ matrix.arch }} strategy: @@ -86,7 +88,7 @@ jobs: version: ${{ needs.prepare.outputs.nightly-version }} macos: - if: github.event_name != 'workflow_dispatch' || inputs.macos + if: ${{ github.repository == 'element-hq/element-web' && (github.event_name != 'workflow_dispatch' || inputs.macos) }} needs: prepare name: macOS uses: ./.github/workflows/build_desktop_macos.yaml @@ -97,7 +99,7 @@ jobs: version: ${{ needs.prepare.outputs.nightly-version }} linux: - if: github.event_name != 'workflow_dispatch' || inputs.linux + if: ${{ github.repository == 'element-hq/element-web' && (github.event_name != 'workflow_dispatch' || inputs.linux) }} needs: prepare name: Linux ${{ matrix.arch }} (sqlcipher ${{ matrix.sqlcipher }}) strategy: @@ -118,7 +120,7 @@ jobs: - windows runs-on: ubuntu-24.04 name: ${{ needs.prepare.outputs.deploy == 'true' && 'Deploy' || 'Deploy (dry-run)' }} - if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') + if: ${{ github.repository == 'element-hq/element-web' && (always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')) }} environment: ${{ needs.prepare.outputs.deploy == 'true' && 'packages.element.io' || '' }} steps: - name: Download artifacts @@ -281,7 +283,7 @@ jobs: needs: deploy runs-on: ubuntu-24.04 name: Deploy builds to ESS - if: needs.prepare.outputs.deploy == 'true' && github.event_name == 'release' + if: ${{ github.repository == 'element-hq/element-web' && (needs.prepare.outputs.deploy == 'true' && github.event_name == 'release') }} env: BUCKET_NAME: "element-desktop-msi.onprem.element.io" AWS_REGION: "eu-central-1" diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index b7f5307c7d..b53476ece1 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -17,6 +17,7 @@ env: jobs: docker: + if: ${{ github.repository == 'element-hq/element-web' }} name: Docker Bake runs-on: ubuntu-24.04 permissions: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 290b045d14..84af1e01a3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,6 +25,7 @@ concurrency: ${{ inputs.site || 'staging.element.io' }} permissions: {} jobs: deploy: + if: ${{ github.repository == 'element-hq/element-web' }} name: "Deploy to Cloudflare Pages" runs-on: ubuntu-24.04 environment: ${{ inputs.site || 'staging.element.io' }} diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 32858d0456..69340fa545 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -11,6 +11,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref_name }} permissions: {} jobs: buildx: + if: ${{ github.repository == 'element-hq/element-web' }} name: Docker Buildx runs-on: ubuntu-24.04 environment: ${{ github.event_name != 'pull_request' && 'dockerhub' || '' }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0ef43b9e7e..11a0b0cf8b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,6 +13,7 @@ concurrency: jobs: build: + if: ${{ github.repository == 'element-hq/element-web' }} name: GitHub Pages runs-on: ubuntu-24.04 steps: @@ -41,6 +42,7 @@ jobs: path: ./docs/.vitepress/dist deploy: + if: ${{ github.repository == 'element-hq/element-web' }} environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/.github/workflows/issue_closed.yml b/.github/workflows/issue_closed.yml index e42d54dc65..fbb5e80efd 100644 --- a/.github/workflows/issue_closed.yml +++ b/.github/workflows/issue_closed.yml @@ -7,6 +7,7 @@ on: permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: tidy: + if: ${{ github.repository == 'element-hq/element-web' }} name: Tidy closed issues runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/localazy_download.yaml b/.github/workflows/localazy_download.yaml index 730c680c73..b8ff26e046 100644 --- a/.github/workflows/localazy_download.yaml +++ b/.github/workflows/localazy_download.yaml @@ -7,6 +7,7 @@ permissions: pull-requests: write # needed to auto-approve PRs jobs: download: + if: ${{ github.repository == 'element-hq/element-web' }} uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@6eda3835118f3bc3fb658a1a3c20b7da9d16ae42 with: packageManager: pnpm diff --git a/.github/workflows/localazy_upload.yaml b/.github/workflows/localazy_upload.yaml index 6c509bc382..fa9fdaf728 100644 --- a/.github/workflows/localazy_upload.yaml +++ b/.github/workflows/localazy_upload.yaml @@ -9,6 +9,7 @@ on: permissions: {} # No permissions needed jobs: upload: + if: ${{ github.repository == 'element-hq/element-web' }} uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@6eda3835118f3bc3fb658a1a3c20b7da9d16ae42 secrets: LOCALAZY_WRITE_KEY: ${{ secrets.LOCALAZY_WRITE_KEY }} diff --git a/.github/workflows/netlify.yaml b/.github/workflows/netlify.yaml index 0aa8372ab7..b69c560218 100644 --- a/.github/workflows/netlify.yaml +++ b/.github/workflows/netlify.yaml @@ -10,7 +10,7 @@ on: - completed jobs: deploy: - if: github.event.workflow_run.conclusion != 'cancelled' && github.event.workflow_run.event == 'pull_request' + if: ${{ github.repository == 'element-hq/element-web' && (github.event.workflow_run.conclusion != 'cancelled' && github.event.workflow_run.event == 'pull_request') }} runs-on: ubuntu-24.04 environment: Netlify permissions: diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index 7b71c36512..33303bc1bc 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -15,6 +15,7 @@ on: concurrency: release jobs: publish: + if: ${{ github.repository == 'element-hq/element-web' }} name: "Publish" runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 129bcea0ef..21587746e4 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -9,6 +9,7 @@ on: permissions: {} jobs: action: + if: ${{ github.repository == 'element-hq/element-web' }} uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop # zizmor: ignore[unpinned-uses] permissions: pull-requests: write diff --git a/.github/workflows/pull_request_base_branch.yaml b/.github/workflows/pull_request_base_branch.yaml index 32c79071ef..dad0b36bf4 100644 --- a/.github/workflows/pull_request_base_branch.yaml +++ b/.github/workflows/pull_request_base_branch.yaml @@ -12,6 +12,10 @@ jobs: with: script: | const baseBranch = context.payload.pull_request.base.ref; - if (!['develop', 'staging'].includes(baseBranch) && !baseBranch.startsWith('feat/')) { + if ( + !['develop', 'staging'].includes(baseBranch) && + !baseBranch.startsWith('feat/') && + !baseBranch.startsWith('release/') + ) { core.setFailed(`Invalid base branch: ${baseBranch}`); } diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index a574539f71..e7c01f4142 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -7,6 +7,7 @@ concurrency: ${{ github.workflow }} permissions: {} jobs: draft: + if: ${{ github.repository == 'element-hq/element-web' }} permissions: contents: write uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop # zizmor: ignore[unpinned-uses] diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index 7985ba20d7..e53682e876 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -7,6 +7,7 @@ concurrency: ${{ github.repository }}-${{ github.workflow }} permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: merge: + if: ${{ github.repository == 'element-hq/element-web' }} uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop # zizmor: ignore[unpinned-uses] secrets: ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1a81af773..3558aae19d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ concurrency: ${{ github.workflow }} permissions: {} jobs: release: + if: ${{ github.repository == 'element-hq/element-web' }} uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop # zizmor: ignore[unpinned-uses] permissions: contents: write @@ -34,6 +35,7 @@ jobs: version-dirs: apps/web apps/desktop check: + if: ${{ github.repository == 'element-hq/element-web' }} name: Post release checks needs: release runs-on: ubuntu-24.04 diff --git a/.github/workflows/release_prepare.yml b/.github/workflows/release_prepare.yml index cbe464d177..b55403b205 100644 --- a/.github/workflows/release_prepare.yml +++ b/.github/workflows/release_prepare.yml @@ -15,6 +15,7 @@ on: permissions: {} # Uses ELEMENT_BOT_TOKEN instead jobs: checks: + if: ${{ github.repository == 'element-hq/element-web' }} name: Sanity checks strategy: matrix: @@ -28,6 +29,7 @@ jobs: repository: ${{ matrix.repo }} prepare: + if: ${{ github.repository == 'element-hq/element-web' }} runs-on: ubuntu-24.04 needs: checks env: diff --git a/.github/workflows/shared-component-storybook-publish.yaml b/.github/workflows/shared-component-storybook-publish.yaml index fcfdf21bb6..af9aad2639 100644 --- a/.github/workflows/shared-component-storybook-publish.yaml +++ b/.github/workflows/shared-component-storybook-publish.yaml @@ -11,10 +11,12 @@ permissions: {} jobs: build: + if: ${{ github.repository == 'element-hq/element-web' }} name: Build storybook uses: ./.github/workflows/shared-component-storybook-build.yml publish: + if: ${{ github.repository == 'element-hq/element-web' }} name: Publish storybook runs-on: ubuntu-latest needs: build diff --git a/.github/workflows/shared-component-visual-tests-netlify.yaml b/.github/workflows/shared-component-visual-tests-netlify.yaml index a1aa61b024..c6a286ad01 100644 --- a/.github/workflows/shared-component-visual-tests-netlify.yaml +++ b/.github/workflows/shared-component-visual-tests-netlify.yaml @@ -17,7 +17,7 @@ permissions: {} jobs: report: - if: github.event.workflow_run.conclusion == 'failure' + if: ${{ github.repository == 'element-hq/element-web' && (github.event.workflow_run.conclusion == 'failure') }} name: Upload Diffs runs-on: ubuntu-24.04 environment: Netlify diff --git a/.github/workflows/shared-component-visual-tests.yaml b/.github/workflows/shared-component-visual-tests.yaml index 471f0d7014..8649e2619c 100644 --- a/.github/workflows/shared-component-visual-tests.yaml +++ b/.github/workflows/shared-component-visual-tests.yaml @@ -14,6 +14,7 @@ permissions: {} # No permissions required jobs: testStorybook: + if: ${{ github.repository == 'element-hq/element-web' }} name: "Run Visual Tests" runs-on: ubuntu-24.04 permissions: diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index def4b36cdf..80864e7203 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -90,6 +90,7 @@ jobs: uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 i18n: + if: ${{ github.repository == 'element-hq/element-web' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index a92fbe6fdb..00a837c2da 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -13,6 +13,7 @@ permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: sync-labels: + if: ${{ github.repository == 'element-hq/element-web' }} uses: element-hq/element-meta/.github/workflows/sync-labels.yml@7f2f93fb9b52ece7a0998f60e64862aa203c1746 with: LABELS: | diff --git a/.github/workflows/triage-assigned.yml b/.github/workflows/triage-assigned.yml index 93545e74e1..bf6241115a 100644 --- a/.github/workflows/triage-assigned.yml +++ b/.github/workflows/triage-assigned.yml @@ -9,11 +9,7 @@ permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: web-app-team: runs-on: ubuntu-24.04 - if: | - contains(github.event.issue.assignees.*.login, 't3chguy') || - contains(github.event.issue.assignees.*.login, 'florianduros') || - contains(github.event.issue.assignees.*.login, 'dbkr') || - contains(github.event.issue.assignees.*.login, 'MidhunSureshR') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.assignees.*.login, 't3chguy') || contains(github.event.issue.assignees.*.login, 'florianduros') || contains(github.event.issue.assignees.*.login, 'dbkr') || contains(github.event.issue.assignees.*.login, 'MidhunSureshR')) }} steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: diff --git a/.github/workflows/triage-incoming.yml b/.github/workflows/triage-incoming.yml index 508a8c51d1..191031c545 100644 --- a/.github/workflows/triage-incoming.yml +++ b/.github/workflows/triage-incoming.yml @@ -8,6 +8,7 @@ permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: automate-project-columns: + if: ${{ github.repository == 'element-hq/element-web' }} runs-on: ubuntu-24.04 steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 diff --git a/.github/workflows/triage-labelled.yml b/.github/workflows/triage-labelled.yml index 3f56e9f784..18bf4b7447 100644 --- a/.github/workflows/triage-labelled.yml +++ b/.github/workflows/triage-labelled.yml @@ -14,18 +14,7 @@ jobs: apply_Z-Labs_label: name: Add Z-Labs label for features behind labs flags runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'A-Maths') || - contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || - contains(github.event.issue.labels.*.name, 'Z-IA') || - contains(github.event.issue.labels.*.name, 'A-Jump-To-Date ') || - contains(github.event.issue.labels.*.name, 'A-Themes-Custom') || - contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || - contains(github.event.issue.labels.*.name, 'A-Tags') || - contains(github.event.issue.labels.*.name, 'A-Video-Rooms') || - contains(github.event.issue.labels.*.name, 'A-Message-Starring') || - contains(github.event.issue.labels.*.name, 'A-Rich-Text-Editor') || - contains(github.event.issue.labels.*.name, 'A-Element-Call') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'A-Maths') || contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || contains(github.event.issue.labels.*.name, 'Z-IA') || contains(github.event.issue.labels.*.name, 'A-Jump-To-Date ') || contains(github.event.issue.labels.*.name, 'A-Themes-Custom') || contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || contains(github.event.issue.labels.*.name, 'A-Tags') || contains(github.event.issue.labels.*.name, 'A-Video-Rooms') || contains(github.event.issue.labels.*.name, 'A-Message-Starring') || contains(github.event.issue.labels.*.name, 'A-Rich-Text-Editor') || contains(github.event.issue.labels.*.name, 'A-Element-Call')) }} steps: - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 with: @@ -40,9 +29,7 @@ jobs: apply_Help-Wanted_label: name: Add "Help Wanted" label to all "good first issue" and Hacktoberfest runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'good first issue') || - contains(github.event.issue.labels.*.name, 'Hacktoberfest') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'good first issue') || contains(github.event.issue.labels.*.name, 'Hacktoberfest')) }} steps: - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 with: @@ -57,8 +44,7 @@ jobs: move_needs_info_issues: name: X-Needs-Info issues to Need info column on triage board runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'X-Needs-Info') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'X-Needs-Info')) }} steps: - id: add_to_project uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 @@ -80,8 +66,7 @@ jobs: move_flakey_test_issues: name: Z-Flaky-Test issues to Sized for maintainer column on triage board runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'Z-Flaky-Test') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'Z-Flaky-Test')) }} steps: - id: add_to_project uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 @@ -103,14 +88,7 @@ jobs: add_priority_design_issues_to_project: name: P1 X-Needs-Design to Design project board runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'X-Needs-Design') && - (contains(github.event.issue.labels.*.name, 'S-Critical') && - (contains(github.event.issue.labels.*.name, 'O-Frequent') || - contains(github.event.issue.labels.*.name, 'O-Occasional')) || - contains(github.event.issue.labels.*.name, 'S-Major') && - contains(github.event.issue.labels.*.name, 'O-Frequent') || - contains(github.event.issue.labels.*.name, 'A11y')) + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'X-Needs-Design') && (contains(github.event.issue.labels.*.name, 'S-Critical') && (contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'O-Occasional')) || contains(github.event.issue.labels.*.name, 'S-Major') && contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'A11y'))) }} steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: @@ -120,8 +98,7 @@ jobs: add_product_issues: name: X-Needs-Product to product project board runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'X-Needs-Product') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'X-Needs-Product')) }} steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: @@ -131,8 +108,7 @@ jobs: Search_issues_to_board: name: Search issues to project board runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'A-New-Search-Experience') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'A-New-Search-Experience')) }} steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: @@ -142,8 +118,7 @@ jobs: voip: name: Add labelled issues to VoIP project board runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'Team: VoIP') + if: "${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'Team: VoIP')) }}" steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: @@ -153,8 +128,7 @@ jobs: crypto: name: Add labelled issues to Crypto project runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'Team: Crypto') + if: "${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'Team: Crypto')) }}" steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: @@ -164,13 +138,7 @@ jobs: tech_debt: name: Add labelled issues to tech debt project runs-on: ubuntu-24.04 - if: > - contains(github.event.issue.labels.*.name, 'A-Developer-Experience') || - contains(github.event.issue.labels.*.name, 'A-Documentation') || - contains(github.event.issue.labels.*.name, 'A-Packaging') || - contains(github.event.issue.labels.*.name, 'A-Technical-Debt') || - contains(github.event.issue.labels.*.name, 'A-Testing') || - contains(github.event.issue.labels.*.name, 'Z-Flaky-Test') + if: ${{ github.repository == 'element-hq/element-web' && (contains(github.event.issue.labels.*.name, 'A-Developer-Experience') || contains(github.event.issue.labels.*.name, 'A-Documentation') || contains(github.event.issue.labels.*.name, 'A-Packaging') || contains(github.event.issue.labels.*.name, 'A-Technical-Debt') || contains(github.event.issue.labels.*.name, 'A-Testing') || contains(github.event.issue.labels.*.name, 'Z-Flaky-Test')) }} steps: - uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0 with: diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index 6933233c0a..ea7ae9795d 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -6,6 +6,7 @@ on: permissions: {} # Uses ELEMENT_BOT_TOKEN instead jobs: add_design_pr_to_project: + if: ${{ github.repository == 'element-hq/element-web' }} name: Move PRs asking for design review to the design board runs-on: ubuntu-24.04 steps: @@ -73,6 +74,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} add_product_pr_to_project: + if: ${{ github.repository == 'element-hq/element-web' }} name: Move PRs asking for design review to the design board runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/triage-stale.yml b/.github/workflows/triage-stale.yml index 093e180b54..5ec518049a 100644 --- a/.github/workflows/triage-stale.yml +++ b/.github/workflows/triage-stale.yml @@ -6,6 +6,7 @@ on: permissions: {} jobs: close: + if: ${{ github.repository == 'element-hq/element-web' }} runs-on: ubuntu-24.04 permissions: actions: write diff --git a/.github/workflows/triage-unlabelled.yml b/.github/workflows/triage-unlabelled.yml index 04f312ab32..668a299fa3 100644 --- a/.github/workflows/triage-unlabelled.yml +++ b/.github/workflows/triage-unlabelled.yml @@ -8,8 +8,7 @@ jobs: move_no_longer_needs_info_issues: name: Move no longer X-Needs-Info issues to Triaged runs-on: ubuntu-24.04 - if: > - !contains(github.event.issue.labels.*.name, 'X-Needs-Info') + if: ${{ github.repository == 'element-hq/element-web' && (!contains(github.event.issue.labels.*.name, 'X-Needs-Info')) }} steps: - id: set_fields uses: nipe0324/update-project-v2-item-field@c4af58452d1c5a788c1ea4f20e073fa722ec4a6b #v2.0.2 @@ -28,20 +27,7 @@ jobs: remove_Z-Labs_label: name: Remove Z-Labs label when features behind labs flags are removed runs-on: ubuntu-24.04 - if: > - !(contains(github.event.issue.labels.*.name, 'A-Maths') || - contains(github.event.issue.labels.*.name, 'A-Message-Pinning') || - contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || - contains(github.event.issue.labels.*.name, 'Z-IA') || - contains(github.event.issue.labels.*.name, 'A-Jump-To-Date') || - contains(github.event.issue.labels.*.name, 'A-Themes-Custom') || - contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || - contains(github.event.issue.labels.*.name, 'A-Tags') || - contains(github.event.issue.labels.*.name, 'A-Video-Rooms') || - contains(github.event.issue.labels.*.name, 'A-Message-Starring') || - contains(github.event.issue.labels.*.name, 'A-Rich-Text-Editor') || - contains(github.event.issue.labels.*.name, 'A-Element-Call')) && - contains(github.event.issue.labels.*.name, 'Z-Labs') + if: ${{ github.repository == 'element-hq/element-web' && (!(contains(github.event.issue.labels.*.name, 'A-Maths') || contains(github.event.issue.labels.*.name, 'A-Message-Pinning') || contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || contains(github.event.issue.labels.*.name, 'Z-IA') || contains(github.event.issue.labels.*.name, 'A-Jump-To-Date') || contains(github.event.issue.labels.*.name, 'A-Themes-Custom') || contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || contains(github.event.issue.labels.*.name, 'A-Tags') || contains(github.event.issue.labels.*.name, 'A-Video-Rooms') || contains(github.event.issue.labels.*.name, 'A-Message-Starring') || contains(github.event.issue.labels.*.name, 'A-Rich-Text-Editor') || contains(github.event.issue.labels.*.name, 'A-Element-Call')) && contains(github.event.issue.labels.*.name, 'Z-Labs')) }} steps: - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 with: diff --git a/.github/workflows/update-jitsi.yml b/.github/workflows/update-jitsi.yml index e67127314f..573ab4e1f4 100644 --- a/.github/workflows/update-jitsi.yml +++ b/.github/workflows/update-jitsi.yml @@ -7,6 +7,7 @@ on: permissions: {} # We use ELEMENT_BOT_TOKEN instead jobs: update: + if: ${{ github.repository == 'element-hq/element-web' }} runs-on: ubuntu-24.04 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 diff --git a/.github/workflows/update-topics.yaml b/.github/workflows/update-topics.yaml index 698c8da804..4bb669c65e 100644 --- a/.github/workflows/update-topics.yaml +++ b/.github/workflows/update-topics.yaml @@ -18,6 +18,7 @@ concurrency: ${{ github.workflow }} permissions: {} # No permissions required jobs: bot: + if: ${{ github.repository == 'element-hq/element-web' }} name: Release topic update runs-on: ubuntu-24.04 environment: Matrix