From fa3f249a7a9271c4e3c2902f9fee1d2e1a560609 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 19 Mar 2024 12:59:04 +0530 Subject: [PATCH] [meta] Omit unnecessary reruns of workflows when deploying When we merge main into a deploy/* branch (e.g. https://github.com/ente-io/ente/pull/1147), all changes get pulled in not just the one related to that deployment, and this causes almost all of the path based workflows to run again unnecessarily. Exclude the various "deploy/**" branches to stop these unnecessary workflows from being triggered. --- .github/workflows/auth-crowdin.yml | 2 +- .github/workflows/auth-lint.yml | 2 +- .github/workflows/docs-deploy.yml | 2 +- .github/workflows/docs-verify-build.yml | 2 +- .github/workflows/mobile-crowdin.yml | 2 +- .github/workflows/mobile-lint.yml | 2 +- .github/workflows/server-lint.yml | 2 +- .github/workflows/web-crowdin.yml | 2 +- .github/workflows/web-lint.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auth-crowdin.yml b/.github/workflows/auth-crowdin.yml index f269a8c8d..f5b674481 100644 --- a/.github/workflows/auth-crowdin.yml +++ b/.github/workflows/auth-crowdin.yml @@ -2,12 +2,12 @@ name: "Sync Crowdin translations (auth)" on: push: + branches: [main] paths: # Run workflow when auth's intl_en.arb is changed - "mobile/lib/l10n/arb/app_en.arb" # Or the workflow itself is changed - ".github/workflows/auth-crowdin.yml" - branches: [main] schedule: # See: [Note: Run workflow on specific days of the week] - cron: "50 1 * * 2,5" diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.yml index 1b45a2d32..72d7b3985 100644 --- a/.github/workflows/auth-lint.yml +++ b/.github/workflows/auth-lint.yml @@ -3,7 +3,7 @@ name: "Lint (auth)" on: # Run on every push to a branch other than main that changes auth/ push: - branches-ignore: [main] + branches-ignore: [main, "deploy/**"] paths: - "auth/**" - ".github/workflows/auth-lint.yml" diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 01b0c2254..772d15815 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -3,7 +3,7 @@ name: "Deploy (docs)" on: # Run on every push to main that changes docs/ push: - branches: [main] + branches-ignore: [main, "deploy/**"] paths: - "docs/**" - ".github/workflows/docs-deploy.yml" diff --git a/.github/workflows/docs-verify-build.yml b/.github/workflows/docs-verify-build.yml index addb52a05..a57f71c86 100644 --- a/.github/workflows/docs-verify-build.yml +++ b/.github/workflows/docs-verify-build.yml @@ -6,7 +6,7 @@ name: "Verify build (docs)" on: # Run on every push to a branch other than main that changes docs/ push: - branches-ignore: [main] + branches-ignore: [main, "deploy/**"] paths: - "docs/**" - ".github/workflows/docs-verify-build.yml" diff --git a/.github/workflows/mobile-crowdin.yml b/.github/workflows/mobile-crowdin.yml index 35b4c3876..377009896 100644 --- a/.github/workflows/mobile-crowdin.yml +++ b/.github/workflows/mobile-crowdin.yml @@ -2,12 +2,12 @@ name: "Sync Crowdin translations (mobile)" on: push: + branches: [main] paths: # Run workflow when mobiles's intl_en.arb is changed - "mobile/lib/l10n/intl_en.arb" # Or the workflow itself is changed - ".github/workflows/mobile-crowdin.yml" - branches: [main] schedule: # See: [Note: Run workflow on specific days of the week] - cron: "40 1 * * 2,5" diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml index cbbbbcfbb..48e38dc6c 100644 --- a/.github/workflows/mobile-lint.yml +++ b/.github/workflows/mobile-lint.yml @@ -3,7 +3,7 @@ name: "Lint (mobile)" on: # Run on every push to a branch other than main that changes mobile/ push: - branches-ignore: [main, f-droid] + branches-ignore: [main, f-droid, "deploy/**"] paths: - "mobile/**" - ".github/workflows/mobile-lint.yml" diff --git a/.github/workflows/server-lint.yml b/.github/workflows/server-lint.yml index c051d0290..d25f2adcc 100644 --- a/.github/workflows/server-lint.yml +++ b/.github/workflows/server-lint.yml @@ -3,7 +3,7 @@ name: "Lint (server)" on: # Run on every push to a branch other than main that changes server/ push: - branches-ignore: [main] + branches-ignore: [main, "deploy/**"] paths: - "server/**" - ".github/workflows/server-lint.yml" diff --git a/.github/workflows/web-crowdin.yml b/.github/workflows/web-crowdin.yml index 8733167d6..45a3fa4a5 100644 --- a/.github/workflows/web-crowdin.yml +++ b/.github/workflows/web-crowdin.yml @@ -2,12 +2,12 @@ name: "Sync Crowdin translations (web)" on: push: + branches: [main] paths: # Run workflow when web's en-US/translation.json is changed - "web/apps/photos/public/locales/en-US/translation.json" # Or the workflow itself is changed - ".github/workflows/web-crowdin.yml" - branches: [main] schedule: # [Note: Run workflow on specific days of the week] # diff --git a/.github/workflows/web-lint.yml b/.github/workflows/web-lint.yml index 7f5d27002..0dc11aa0e 100644 --- a/.github/workflows/web-lint.yml +++ b/.github/workflows/web-lint.yml @@ -3,7 +3,7 @@ name: "Lint (web)" on: # Run on every push to a branch other than main that changes web/ push: - branches-ignore: [main] + branches-ignore: [main, "deploy/**"] paths: - "web/**" - ".github/workflows/web-lint.yml"