[ci]: skip the pipeline entirely if branch isn't master

currently, it will clone the repo and then skip the step. this is
wasteful, instead skip the pipeline entirely.
This commit is contained in:
NRK 2022-06-17 14:01:09 +06:00 committed by Gitea
parent a9d2b5b088
commit 8248729320
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
branches: master
pipeline:
analysis:
image: alpine
when:
branch: master
commands: |
apk add --no-cache build-base cppcheck clang-extra-tools \
imlib2-dev xorgproto \

View File

@ -1,11 +1,11 @@
branches: master
# NOTE: "stable" tcc is too old and fails at linking. instead fetching a recent known working commit.
pipeline:
build:
image: alpine
environment:
- TCC_SHA=027b8fb9b88fe137447fb8bb1b61079be9702472
when:
branch: master
commands: |
apk add --no-cache \
imlib2 imlib2-dev xorgproto \