Skip to content

Commit 402ffcc

Browse files
committed
ci: build only on master branch
Restrict push/pull_request triggers to master in build-matrix and unit-tests, and drop the main-branch condition in the matrix bundle step, now that the repo consolidates on a single master branch.
1 parent a08b012 commit 402ffcc

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/build-matrix.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Firmware Matrix Build
22

33
on:
44
push:
5+
branches: [master]
56
pull_request:
7+
branches: [master]
68
workflow_dispatch:
79

810
jobs:
@@ -63,7 +65,7 @@ jobs:
6365
if [ "${{github.event_name}}" = "schedule" ]; then
6466
echo "release_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
6567
fi
66-
if [ "${{github.event_name}}" == "push" -o "${{github.event_name}}" == "schedule" -o "${{github.event_name}}" == "workflow_dispatch" ] && [ "${{github.ref}}" == "refs/heads/master" -o "${{github.ref}}" == "refs/heads/main" ]; then
68+
if [ "${{github.event_name}}" == "push" -o "${{github.event_name}}" == "schedule" -o "${{github.event_name}}" == "workflow_dispatch" ] && [ "${{github.ref}}" == "refs/heads/master" ]; then
6769
echo 'extra_makefile_targets=build_both_bundles' >> $GITHUB_OUTPUT
6870
# uncomment this line for upload! echo 'upload=ftp_upload_bundles' >> $GITHUB_OUTPUT
6971
# not pushing from matrix

‎.github/workflows/unit-tests.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
schedule:
55
- cron: '0 1 * * *'
66
push:
7+
branches: [master]
78
# pull_request:
89
workflow_dispatch:
910

0 commit comments

Comments
 (0)