Skip to content

Commit 8aea3cf

Browse files
committed
CI: Exclude l10n_master for both push and pull requests
1 parent b5c7f7c commit 8aea3cf

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010

1111
build-opensuse:
1212
name: Build openSUSE
13-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
13+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
14+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
15+
(github.event_name == 'release')
1416
runs-on: ubuntu-latest
1517
strategy:
1618
fail-fast: false
@@ -150,7 +152,9 @@ jobs:
150152
151153
build-fedora:
152154
name: Build Fedora
153-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
155+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
156+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
157+
(github.event_name == 'release')
154158
runs-on: ubuntu-latest
155159
strategy:
156160
fail-fast: false
@@ -242,7 +246,9 @@ jobs:
242246
243247
build-openmandriva:
244248
name: Build OpenMandriva
245-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
249+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
250+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
251+
(github.event_name == 'release')
246252
runs-on: ubuntu-latest
247253
strategy:
248254
fail-fast: false
@@ -342,7 +348,9 @@ jobs:
342348
343349
build-mageia:
344350
name: Build Mageia
345-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
351+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
352+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
353+
(github.event_name == 'release')
346354
runs-on: ubuntu-latest
347355
strategy:
348356
fail-fast: false
@@ -442,7 +450,9 @@ jobs:
442450
443451
build-debian:
444452
name: Build Debian
445-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
453+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
454+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
455+
(github.event_name == 'release')
446456
runs-on: ubuntu-latest
447457
strategy:
448458
fail-fast: false
@@ -534,7 +544,9 @@ jobs:
534544
535545
build-ubuntu:
536546
name: Build Ubuntu
537-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
547+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
548+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
549+
(github.event_name == 'release')
538550
runs-on: ubuntu-latest
539551
strategy:
540552
fail-fast: false
@@ -630,7 +642,9 @@ jobs:
630642
631643
upload-ubuntu-ppa:
632644
name: Upload Ubuntu PPA
633-
if: github.repository == 'strawberrymusicplayer/strawberry' && github.event.pull_request.head.repo.fork == false && (github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci' || github.ref == 'refs/heads/1.1')))
645+
if: github.repository == 'strawberrymusicplayer/strawberry' &&
646+
github.event.pull_request.head.repo.fork == false &&
647+
(github.event_name == 'release' || (github.event_name == 'push' && (github.ref_name == 'master' || github.ref_name == 'ci')))
634648
runs-on: ubuntu-latest
635649
strategy:
636650
fail-fast: false
@@ -726,7 +740,8 @@ jobs:
726740

727741
build-freebsd:
728742
name: Build FreeBSD
729-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
743+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
744+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master')
730745
runs-on: ubuntu-latest
731746
steps:
732747
- name: Checkout
@@ -757,7 +772,8 @@ jobs:
757772
758773
build-openbsd:
759774
name: Build OpenBSD
760-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
775+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
776+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master')
761777
runs-on: ubuntu-latest
762778
steps:
763779
- name: Checkout
@@ -783,7 +799,9 @@ jobs:
783799
784800
build-macos-public:
785801
name: Build macOS Public
786-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
802+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
803+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
804+
(github.event_name == 'release')
787805

788806
strategy:
789807
fail-fast: false
@@ -1065,7 +1083,9 @@ jobs:
10651083

10661084
build-windows-mingw:
10671085
name: Build Windows MinGW
1068-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
1086+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
1087+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
1088+
(github.event_name == 'release')
10691089
runs-on: ubuntu-latest
10701090
strategy:
10711091
fail-fast: false
@@ -1254,7 +1274,9 @@ jobs:
12541274

12551275
build-windows-msvc:
12561276
name: Build Windows MSVC
1257-
if: github.repository != 'strawberrymusicplayer/strawberry-private' && github.ref != 'refs/heads/l10n_master'
1277+
if: (github.event_name == 'push' && github.repository == 'strawberrymusicplayer/strawberry' && github.ref_name != 'l10n_master') ||
1278+
(github.event_name == 'pull_request' && github.head_ref != 'l10n_master') ||
1279+
(github.event_name == 'release')
12581280
strategy:
12591281
fail-fast: false
12601282
matrix:
@@ -1625,7 +1647,9 @@ jobs:
16251647

16261648
upload:
16271649
name: Upload
1628-
if: (success() || failure()) && github.repository == 'strawberrymusicplayer/strawberry' && (github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci')))
1650+
if: (success() || failure()) &&
1651+
github.repository == 'strawberrymusicplayer/strawberry' &&
1652+
(github.event_name == 'release' || (github.event_name == 'push' && github.event.pull_request.head.repo.fork == false && (github.ref_name == 'master' || github.ref_name == 'ci')))
16291653
runs-on: ubuntu-latest
16301654
needs:
16311655
- build-opensuse

0 commit comments

Comments
 (0)